From 5be4e5b903e884f4431ccb750b5c027df47f74db Mon Sep 17 00:00:00 2001 From: Wengang Wu Date: Fri, 18 Jul 2014 14:13:59 -0500 Subject: IKXCLOCK-2896 Display: support ambient mode timeout Change-Id: I28422cfbfefb03671ad6868eb87a828481982a9c --- drivers/misc/c55_ctrl.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'drivers/misc/c55_ctrl.c') diff --git a/drivers/misc/c55_ctrl.c b/drivers/misc/c55_ctrl.c index ccb1a6b32b6..49f84e6bcb6 100644 --- a/drivers/misc/c55_ctrl.c +++ b/drivers/misc/c55_ctrl.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -169,8 +170,8 @@ static ssize_t c55_ctrl_enable(struct device *dev, gpio_set_value(cdata->ap_c55_int_gpio, 1); if (m4sensorhub_reg_write_1byte - (m4sensorhub, M4SH_REG_USERSETTINGS_SCREENSTATUS, 0x01, 0xFF - ) != 1) { + (m4sensorhub, M4SH_REG_USERSETTINGS_SCREENSTATUS, + INTERACTIVE_ON, SCREEN_STATUS_INTERACTIVE_MASK) != 1) { dev_err(dev, "Unable to set screen status to 0x01\n"); mutex_unlock(&cdata->ctrl_mutex); return -EINVAL; @@ -189,8 +190,8 @@ static ssize_t c55_ctrl_enable(struct device *dev, } if (m4sensorhub_reg_write_1byte - (m4sensorhub, M4SH_REG_USERSETTINGS_SCREENSTATUS, 0x00, 0xFF - ) != 1) { + (m4sensorhub, M4SH_REG_USERSETTINGS_SCREENSTATUS, + INTERACTIVE_OFF, SCREEN_STATUS_INTERACTIVE_MASK) != 1) { dev_err(dev, "Unable to set screen status to 0x00\n"); mutex_unlock(&cdata->ctrl_mutex); return -EINVAL; @@ -375,8 +376,8 @@ static int c55_ctrl_suspend(struct platform_device *dev, pm_message_t state) } if (m4sensorhub_reg_write_1byte - (m4sensorhub, M4SH_REG_USERSETTINGS_SCREENSTATUS, 0x00, 0xFF - ) != 1) { + (m4sensorhub, M4SH_REG_USERSETTINGS_SCREENSTATUS, + INTERACTIVE_OFF, SCREEN_STATUS_INTERACTIVE_MASK) != 1) { dev_err(&dev->dev, "Unable to set screen status to 0x00\n"); } -- cgit v1.2.3-70-g09d2