sensors:add sensor debug support
[firefly-linux-kernel-4.4.55.git] / drivers / input / sensors / lsensor / isl29023.c
index d71c7cecbeb09a73ce41fd6da9bd36d570ff75a3..b70e8ae5a5fa75e7c076a9e9f98c7c8d5de2765c 100755 (executable)
 #endif\r
 #include <linux/sensor-dev.h>\r
 \r
-#if 0\r
-#define SENSOR_DEBUG_TYPE SENSOR_TYPE_LIGHT\r
-#define DBG(x...) if(sensor->pdata->type == SENSOR_DEBUG_TYPE) printk(x)\r
-#else\r
-#define DBG(x...)\r
-#endif\r
 \r
 #define ISL29023_REG_ADD_COMMAND1      0x00\r
 #define COMMMAND1_OPMODE_SHIFT         5\r
@@ -87,7 +81,7 @@ static int sensor_active(struct i2c_client *client, int enable, int rate)
        struct sensor_private_data *sensor =\r
            (struct sensor_private_data *) i2c_get_clientdata(client);  \r
        int result = 0;\r
-       int status = 0;\r
+       //int status = 0;\r
 \r
        sensor->ops->ctrl_data = sensor_read_reg(client, sensor->ops->ctrl_reg);\r
        \r
@@ -224,7 +218,7 @@ static int sensor_report_value(struct i2c_client *client)
        return result;\r
 }\r
 \r
-struct sensor_operate light_stk3171_ops = {\r
+struct sensor_operate light_isl29023_ops = {\r
        .name                           = "ls_isl29023",\r
        .type                           = SENSOR_TYPE_LIGHT,    //sensor type and it should be correct\r
        .id_i2c                         = LIGHT_ID_ISL29023,    //i2c id number\r
@@ -248,21 +242,20 @@ struct sensor_operate light_stk3171_ops = {
 //function name should not be changed\r
 static struct sensor_operate *light_get_ops(void)\r
 {\r
-       return &light_stk3171_ops;\r
+       return &light_isl29023_ops;\r
 }\r
 \r
 \r
-static int __init light_stk3171_init(void)\r
+static int __init light_isl29023_init(void)\r
 {\r
        struct sensor_operate *ops = light_get_ops();\r
        int result = 0;\r
        int type = ops->type;\r
        result = sensor_register_slave(type, NULL, NULL, light_get_ops);\r
-       //printk("%s\n",__func__);\r
        return result;\r
 }\r
 \r
-static void __exit light_stk3171_exit(void)\r
+static void __exit light_isl29023_exit(void)\r
 {\r
        struct sensor_operate *ops = light_get_ops();\r
        int type = ops->type;\r
@@ -270,7 +263,7 @@ static void __exit light_stk3171_exit(void)
 }\r
 \r
 \r
-module_init(light_stk3171_init);\r
-module_exit(light_stk3171_exit);\r
+module_init(light_isl29023_init);\r
+module_exit(light_isl29023_exit);\r
 \r
 \r