diff options
Diffstat (limited to 'include/linux/sensor/gp2a.h')
-rw-r--r-- | include/linux/sensor/gp2a.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sensor/gp2a.h b/include/linux/sensor/gp2a.h index 4b2b62c..08ec548 100644 --- a/include/linux/sensor/gp2a.h +++ b/include/linux/sensor/gp2a.h @@ -28,6 +28,11 @@ #define ADC_BUFFER_NUM 6 +#define DEFAULT_LO_THR 0x07 /* sharp recommand Loff */ +#define DEFAULT_HI_THR 0x08 /* sharp recommand Lon */ + +#define OFFSET_ARRAY_LENGTH 10 + /* 16 level for premium model*/ enum { LIGHT_DIM = 0, @@ -58,12 +63,18 @@ extern char proximity_sensor_detection; /* prototype */ int opt_i2c_read(u8 reg, unsigned char *rbuf, int len); int opt_i2c_write(u8 reg, u8 *val); +#ifndef CONFIG_MACH_KONA_SENSOR int lightsensor_get_adcvalue(void); +#endif int is_gp2a030a(void); struct gp2a_platform_data { int (*gp2a_led_on) (bool); int p_out; /* proximity-sensor-output gpio */ +#ifdef CONFIG_MACH_KONA_SENSOR + unsigned long (*gp2a_get_threshold)(u8 *); +#else unsigned long (*gp2a_get_threshold)(void); +#endif }; #endif |