CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_ARCH_RK3188=y
-# CONFIG_DDR_INIT_CHANGE_FREQ is not set
-CONFIG_DDR_FREQ=y
# CONFIG_DDR_TEST is not set
CONFIG_RK_CLOCK_PROC=y
CONFIG_CLK_SWITCH_TO_32K=y
CONFIG_GS_LIS3DH=y
CONFIG_GYRO_L3G4200D=y
CONFIG_LIGHT_SENSOR_DEVICE=y
-CONFIG_LS_US5151=y
CONFIG_SENSOR_DEVICE=y
CONFIG_GSENSOR_DEVICE=y
CONFIG_COMPASS_DEVICE=y
CONFIG_GYROSCOPE_DEVICE=y
+CONFIG_LIGHT_DEVICE=y
+CONFIG_LS_PHOTORESISTOR=y
# CONFIG_SERIO is not set
# CONFIG_CONSOLE_TRANSLATIONS is not set
# CONFIG_LEGACY_PTYS is not set
static struct sensor_platform_data light_photoresistor_info = {
.type = SENSOR_TYPE_LIGHT,
.irq_enable = 0,
- .address = 2 ;
+ .address = 2 ,
.poll_delay_ms = 200,
};
#endif
#endif
#include <linux/sensor-dev.h>
-#if 0
+static int ls_photoresistor_dbg_level = 0;
+module_param_named(dbg_level, ls_photoresistor_dbg_level, int, 0644);
+#if 1
#define SENSOR_DEBUG_TYPE SENSOR_TYPE_LIGHT
-#define DBG(x...) printk(x)
+#define DBG( args...) \
+ do { \
+ if (ls_photoresistor_dbg_level) { \
+ pr_info(args); \
+ } \
+ } while (0)
#else
#define DBG(x...) printk(x)
#endif
struct sensor_platform_data *pdata;\r
int result = 0;\r
int type = 0;\r
- dev_info(&client->adapter->dev, "-------------------------------------%s: %s,0x%x\n", __func__, devid->name,(unsigned int)client);\r
+ dev_info(&client->adapter->dev, "%s: %s,0x%x\n", __func__, devid->name,(unsigned int)client);\r
\r
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {\r
result = -ENODEV;\r