diff options
author | Andy Green <andy@openmoko.com> | 2008-11-19 17:10:58 +0000 |
---|---|---|
committer | Andy Green <agreen@pads.home.warmcat.com> | 2008-11-19 17:10:58 +0000 |
commit | c4e0e1827cb392a78db2e53c0742422cd0bb9fef (patch) | |
tree | 66ed76b4389105075450f0e2cf3090a2f8b84129 /drivers | |
parent | 3cd5e1f63cf21edcaae005d906b562a2d6f64ead (diff) |
fix-pcf50633-do-backlight-bringup-in-probe.patch
Qi does not touch the backlight, we have to do it in Linux now
Signed-off-by: Andy Green <andy@openmoko.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/i2c/chips/pcf50633.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/i2c/chips/pcf50633.c b/drivers/i2c/chips/pcf50633.c index 0a8daf40a3e..d49e9fda443 100644 --- a/drivers/i2c/chips/pcf50633.c +++ b/drivers/i2c/chips/pcf50633.c @@ -2198,6 +2198,20 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind) reg_write(pcf, PCF50633_REG_INT4M, 0x00); reg_write(pcf, PCF50633_REG_INT5M, 0x00); + /* force the backlight up, Qi does not do this for us */ + + /* pcf50633 manual p60 + * "led_out should never be set to 000000, as this would result + * in a deadlock making it impossible to program another value. + * If led_out should be inadvertently set to 000000, the + * LEDOUT register can be reset by disabling and enabling the + * LED converter via control bit led_on in the LEDENA register" + */ + reg_write(pcf, PCF50633_REG_LEDENA, 0x00); + reg_write(pcf, PCF50633_REG_LEDDIM, 0x01); + reg_write(pcf, PCF50633_REG_LEDENA, 0x01); + reg_write(pcf, PCF50633_REG_LEDOUT, 0x3f); + err = request_irq(irq, pcf50633_irq, IRQF_TRIGGER_FALLING, "pcf50633", pcf); if (err < 0) @@ -2223,7 +2237,7 @@ static int pcf50633_detect(struct i2c_adapter *adapter, int address, int kind) &pcf50633bl_ops); if (!pcf->backlight) goto exit_rtc; - /* FIXME: are we sure we want default == off? */ + pcf->backlight->props.max_brightness = 0x3f; pcf->backlight->props.power = FB_BLANK_UNBLANK; pcf->backlight->props.fb_blank = FB_BLANK_UNBLANK; |