[ARM]: tegra: stingray: set backlight scaling factor
authormakarand.karvekar <makarand.karvekar@motorola.com>
Fri, 4 Mar 2011 16:10:13 +0000 (10:10 -0600)
committerRebecca Schultz Zavin <rebecca@android.com>
Fri, 4 Mar 2011 18:54:47 +0000 (10:54 -0800)
set backlight scaling factor based on display panel.
AUO scaling at 726 makes it bit more brighter

Change-Id: I568ff158f00260894d95c00ac1e96632e2636d58
Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
arch/arm/mach-tegra/board-stingray-panel.c

index 915cb8fa7877944bf29e90b24ffc1d70007e5112..4720129691f29e615bdbe3ac4b629470e4cb22f4 100644 (file)
@@ -451,8 +451,19 @@ struct lp8550_platform_data stingray_lp8550_backlight_data = {
        .direct_ctrl = 0x01,
        .eeprom_table = stingray_lp8550_eeprom_data,
        .eeprom_tbl_sz = ARRAY_SIZE(stingray_lp8550_eeprom_data),
+       .scaling_factor = 690, /* For SHP and default */
 };
 
+static int stingray_lp8550_init(void)
+{
+       struct lp8550_platform_data *pdata =
+                        &stingray_lp8550_backlight_data;
+       if (!strncmp(lcd_manfid, "AUO", 3))
+               pdata->scaling_factor = 726;
+
+       return 0;
+}
+
 static struct i2c_board_info __initdata stingray_i2c_bus1_led_info[] = {
         {
                I2C_BOARD_INFO(LD_LP8550_NAME, 0x2c),
@@ -506,6 +517,7 @@ int __init stingray_panel_init(void)
        platform_device_register(&stingray_panel_early_reg_keyreset_device);
 
        stingray_hdmi_init();
+       stingray_lp8550_init();
 
        stingray_csi_reg = regulator_get(NULL, "vcsi");
        if (IS_ERR(stingray_csi_reg)) {