summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJohnny Qiu <joqiu@nvidia.com>2012-02-13 15:33:11 +0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-02-17 06:43:39 -0800
commit03835470a673447cd3dafd2df9d7081e378b1aac (patch)
treeac7875dfa8f1beefcdbfce17869138e1153b4680 /include/linux
parent46aa6c47a60afebb79b21e4f909bb892148a41ef (diff)
input: misc: Fix code style issues for CM3217
Bug 937953 Change-Id: I5466fedf6fdcd1f577753736e9eb9b2dbf5b52c0 Signed-off-by: Johnny Qiu <joqiu@nvidia.com> Reviewed-on: http://git-master/r/83386 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/cm3217.h45
-rw-r--r--include/linux/lightsensor.h6
2 files changed, 25 insertions, 26 deletions
diff --git a/include/linux/cm3217.h b/include/linux/cm3217.h
index 6fc480911012..29c72b58f8e7 100644
--- a/include/linux/cm3217.h
+++ b/include/linux/cm3217.h
@@ -1,7 +1,7 @@
/* include/linux/cm3217.h
*
* Copyright (C) 2011 Capella Microsystems Inc.
- * Author: Frank Hsieh <pengyueh@gmail.com>
+ * Author: Frank Hsieh <pengyueh@gmail.com>
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -17,44 +17,43 @@
#ifndef __LINUX_CM3217_H
#define __LINUX_CM3217_H
-#define CM3217_I2C_NAME "cm3217"
+#define CM3217_I2C_NAME "cm3217"
-#define ALS_W_CMD1_addr 0x20 >> 1
-#define ALS_W_CMD2_addr 0x22 >> 1
-#define ALS_R_MSB_addr 0x21 >> 1
-#define ALS_R_LSB_addr 0x23 >> 1
+#define ALS_W_CMD1_addr (0x20 >> 1)
+#define ALS_W_CMD2_addr (0x22 >> 1)
+#define ALS_R_MSB_addr (0x21 >> 1)
+#define ALS_R_LSB_addr (0x23 >> 1)
-#define ALS_CALIBRATED 0x6E93
+#define ALS_CALIBRATED 0x6E93
+/* cm3217 */
-/*cm3217*/
-/*for ALS command 20h*/
+/* for ALS command 20h */
#define CM3217_ALS_BIT5_Default_1 (1 << 5)
#define CM3217_ALS_IT_HALF_T (0 << 2)
#define CM3217_ALS_IT_1_T (1 << 2)
#define CM3217_ALS_IT_2_T (2 << 2)
#define CM3217_ALS_IT_4_T (4 << 2)
-#define CM3217_ALS_WDM_DEFAULT_1 (1 << 1)
-#define CM3217_ALS_SD (1 << 0)
-
-/*for ALS command 22h*/
-#define CM3217_ALS_IT_800ms (0 << 5)
-#define CM3217_ALS_IT_400ms (1 << 5)
-#define CM3217_ALS_IT_266ms (2 << 5)
-#define CM3217_ALS_IT_200ms (3 << 5)
-#define CM3217_ALS_IT_130ms (4 << 5)
-#define CM3217_ALS_IT_100ms (5 << 5)
-#define CM3217_ALS_IT_80ms (6 << 5)
-#define CM3217_ALS_IT_66ms (7 << 5)
+#define CM3217_ALS_WDM_DEFAULT_1 (1 << 1)
+#define CM3217_ALS_SD (1 << 0)
+
+/* for ALS command 22h */
+#define CM3217_ALS_IT_800ms (0 << 5)
+#define CM3217_ALS_IT_400ms (1 << 5)
+#define CM3217_ALS_IT_266ms (2 << 5)
+#define CM3217_ALS_IT_200ms (3 << 5)
+#define CM3217_ALS_IT_130ms (4 << 5)
+#define CM3217_ALS_IT_100ms (5 << 5)
+#define CM3217_ALS_IT_80ms (6 << 5)
+#define CM3217_ALS_IT_66ms (7 << 5)
struct cm3217_platform_data {
uint16_t levels[10];
uint16_t golden_adc;
- int (*power)(int, uint8_t); /* power to the chip */
+ int (*power) (int, uint8_t); /* power to the chip */
uint16_t ALS_slave_address;
};
-/* from cm3602.h */
#define LS_PWR_ON (1 << 0)
#endif
diff --git a/include/linux/lightsensor.h b/include/linux/lightsensor.h
index b86ab58a642c..7a87853ac064 100644
--- a/include/linux/lightsensor.h
+++ b/include/linux/lightsensor.h
@@ -20,9 +20,9 @@
#include <linux/types.h>
#include <linux/ioctl.h>
-#define LIGHTSENSOR_IOCTL_MAGIC 'l'
+#define LIGHTSENSOR_IOCTL_MAGIC 'l'
-#define LIGHTSENSOR_IOCTL_GET_ENABLED _IOR(LIGHTSENSOR_IOCTL_MAGIC, 1, int *)
-#define LIGHTSENSOR_IOCTL_ENABLE _IOW(LIGHTSENSOR_IOCTL_MAGIC, 2, int *)
+#define LIGHTSENSOR_IOCTL_GET_ENABLED _IOR(LIGHTSENSOR_IOCTL_MAGIC, 1, int *)
+#define LIGHTSENSOR_IOCTL_ENABLE _IOW(LIGHTSENSOR_IOCTL_MAGIC, 2, int *)
#endif