summaryrefslogtreecommitdiff
path: root/drivers/misc/c55_ctrl.c
diff options
context:
space:
mode:
authorWengang Wu <wgw@motorola.com>2014-07-18 14:13:59 -0500
committerWengang Wu <wgw@motorola.com>2014-07-18 14:13:59 -0500
commit5be4e5b903e884f4431ccb750b5c027df47f74db (patch)
tree68d630cea96785dc44b1014a5b69d0135ac67389 /drivers/misc/c55_ctrl.c
parent0e4a00c83a912944beed3d2d36915278a0d418f7 (diff)
downloadolio-linux-3.10-5be4e5b903e884f4431ccb750b5c027df47f74db.tar.xz
olio-linux-3.10-5be4e5b903e884f4431ccb750b5c027df47f74db.zip
IKXCLOCK-2896 Display: support ambient mode timeout
Change-Id: I28422cfbfefb03671ad6868eb87a828481982a9c
Diffstat (limited to 'drivers/misc/c55_ctrl.c')
-rw-r--r--drivers/misc/c55_ctrl.c13
1 files changed, 7 insertions, 6 deletions
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 <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/m4sensorhub.h>
+#include <linux/m4sensorhub/MemMapUserSettings.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
@@ -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");
}