htcleo: add lightsensor driver

There are still power on problems, has to be fixed
This commit is contained in:
K. Cotulla Ivan 2010-09-05 11:12:00 +02:00 committed by Markinus
parent 7028f519dc
commit d3195c3099
4 changed files with 10 additions and 2 deletions

View File

@ -119,7 +119,7 @@ obj-$(CONFIG_MACH_HTCLEO) += board-htcleo-ts.o board-htcleo-mmc.o ieee754-df.o b
obj-$(CONFIG_MACH_HTCLEO) += board-htcleo-battery.o board-htcleo-log.o board-htcleo-audio.o board-htcleo-acoustic.o
obj-$(CONFIG_MACH_HTCLEO) += board-htcleo-bt.o board-htcleo-wifi.o board-htcleo-microp.o board-htcleo-bkl.o
obj-$(CONFIG_MACH_HTCLEO) += board-htcleo-proximity.o board-htcleo-leds.o
obj-$(CONFIG_MACH_HTCLEO) += board-htcleo-proximity.o board-htcleo-leds.o board-htcleo-ls.o
obj-$(CONFIG_MACH_HTCLEO) += clock-wince.o
# MSM7x30 boards

View File

@ -63,7 +63,9 @@ int htcleo_brightness_set_bkl(uint8_t value)
value = 9;
}
// disable autobrigtness
data[0] = 0;
// CotullaTEST: Lsensor test, add 0x100
// data[0] = 0;
data[0] = 1;
data[1] = 0;
ret = microp_i2c_write(MICROP_I2C_WCMD_AUTO_BL_CTL, data, 2); // 23
if (ret != 0)

View File

@ -188,6 +188,7 @@ static struct platform_device microp_devices[] = {
},
{
.name = "htcleo-backlight",
.id = -1,
},
{
.name = "htcleo-proximity",
@ -197,6 +198,10 @@ static struct platform_device microp_devices[] = {
.name = "htcleo-leds",
.id = -1,
},
{
.name = "htcleo-lsensor",
.id = -1,
},
};
static struct microp_i2c_platform_data microp_data = {

View File

@ -62,6 +62,7 @@ struct microp_i2c_client_data {
#define MICROP_I2C_WCMD_LED_PWM 0x25
#define MICROP_I2C_WCMD_BL_EN 0x26
#define MICROP_I2C_RCMD_VERSION 0x30
#define MICROP_I2C_RCMD_LSENSOR 0x33
#define MICROP_I2C_WCMD_ADC_TABLE 0x42
#define MICROP_I2C_WCMD_LED_CTRL 0x51
#define MICROP_I2C_WCMD_LED_MODE 0x53