leds: lp8550: get backlight scaling factor from platform data

backlight scaling factor varies with display panel

Change-Id: I45ea0d76526d4297412d177481acded082ce7104
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
This commit is contained in:
makarand.karvekar 2011-03-04 10:01:37 -06:00 committed by Rebecca Schultz Zavin
commit cbdfcbc03f
2 changed files with 3 additions and 2 deletions

View file

@ -257,9 +257,9 @@ static void lp8550_brightness_write(struct lp8550_data *led_data)
if (led_data->led_pdata->dev_ctrl_config ==
LP8550_BRT_MODE_PWM) {
//scale the brightness to prevent more than 19mA per LED
/* scale the brightness to prevent more than 19mA per LED */
if (lp8550_write_reg(led_data, LP8550_EEPROM_A0,
(brightness * 625) / 1000))
(brightness * led_data->led_pdata->scaling_factor) / 1000))
pr_err("%s:Failed to set brightness:%d\n",
__func__, error);
}

View file

@ -36,6 +36,7 @@ struct lp8550_platform_data {
u8 direct_ctrl;
struct lp8550_eeprom_data *eeprom_table;
int eeprom_tbl_sz;
int scaling_factor;
};
#endif /* __KERNEL__ */