+ jbt_power_mode_names[new_mode]);
+
+ mutex_unlock(&jbt->lock);
+
+ return rc;
+}
+EXPORT_SYMBOL_GPL(jbt6k74_enter_power_mode);
+
+int jbt6k74_set_resolution(struct jbt_info *jbt, enum jbt_resolution new_resolution) {
+ int rc = 0;
+ enum jbt_resolution old_resolution;
+
+ mutex_lock(&jbt->lock);
+
+ if (jbt->resolution == new_resolution)
+ return 0;
+
+ if (new_resolution != JBT_RESOLUTION_VGA &&
+ new_resolution != JBT_RESOLUTION_QVGA)
+ return -EINVAL;
+
+ old_resolution = jbt->resolution;
+ jbt->resolution = new_resolution;
+
+ if (jbt->power_mode == JBT_POWER_MODE_NORMAL) {
+
+ /* first transition into sleep */
+ rc = normal_to_sleep(jbt);
+ /* second transition into deep standby */
+/* rc |= sleep_to_standby(jbt);*/
+ /* third transition into sleep */
+/* rc |= standby_to_sleep(jbt);*/
+ /* fourth transition into normal */
+ rc |= sleep_to_normal(jbt);
+
+ if (rc) {
+ jbt->resolution = old_resolution;
+ dev_err(&jbt->spi_dev->dev, "Failed to set resolution '%s')\n",
+ jbt_resolution_names[new_resolution]);
+ }
+ }