diff options
author | Sean Paul <seanpaul@chromium.org> | 2011-09-21 15:18:45 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2011-09-27 09:08:21 -0700 |
commit | fa9e36d6efa9d75a2e8dc79a95d5b3a66d9d000e (patch) | |
tree | d6290395581adb7c290a9c87800b75ff3c1771a6 | |
parent | 9cc79dbbd72b2200763357a0c0fdd16190f3ed5e (diff) |
CHROMIUM: ARM: tegra: asymptote: Fix Asymptote backlight vdd enable line
This line is a NC on Asymptote, but right now we're using the pwm line
(incorrectly). This CL removes the backlight-vdd line from Asymptote
dts and ensures that it's safely ignored if it's missing.
BUG=None
TEST=Built u-boot for Asymptote and flashed it on the device. Ensured that the
backlight still works in u-boot.
Change-Id: Id751b6756bac120e2211b7b32c58f356ff30b767
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/8063
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | board/nvidia/seaboard/tegra2-asymptote.dts | 2 | ||||
-rw-r--r-- | common/fdt_decode.c | 3 | ||||
-rw-r--r-- | drivers/video/tegra2.c | 6 | ||||
-rw-r--r-- | include/fdt_decode.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/board/nvidia/seaboard/tegra2-asymptote.dts b/board/nvidia/seaboard/tegra2-asymptote.dts index c5a3529dcba..292c32152eb 100644 --- a/board/nvidia/seaboard/tegra2-asymptote.dts +++ b/board/nvidia/seaboard/tegra2-asymptote.dts @@ -84,7 +84,7 @@ /* Parameter 3 bit 0:1=output, 0=input; bit 1:1=high, 0=low */ backlight-enable = <&gpio 28 1>; /* PD4 */ lvds-shutdown = <&gpio 10 1>; /* PB2 */ - backlight-vdd = <&gpio 165 1>; /* PU5 */ + /* Asymptote does not have backlight-vdd */ panel-vdd = <&gpio 22 1>; /* PC6 */ /* diff --git a/common/fdt_decode.c b/common/fdt_decode.c index adad546fb0c..e204368606f 100644 --- a/common/fdt_decode.c +++ b/common/fdt_decode.c @@ -518,8 +518,7 @@ int fdt_decode_lcd(const void *blob, struct fdt_lcd *config) &config->backlight_en); err |= fdt_decode_gpio(blob, node, "lvds-shutdown", &config->lvds_shutdown); - err |= fdt_decode_gpio(blob, node, "backlight-vdd", - &config->backlight_vdd); + fdt_decode_gpio(blob, node, "backlight-vdd", &config->backlight_vdd); err |= fdt_decode_gpio(blob, node, "panel-vdd", &config->panel_vdd); if (err) return -FDT_ERR_MISSING; diff --git a/drivers/video/tegra2.c b/drivers/video/tegra2.c index a8d83d3708c..429194b0476 100644 --- a/drivers/video/tegra2.c +++ b/drivers/video/tegra2.c @@ -152,8 +152,10 @@ static void init_lcd_pwm(struct fdt_lcd *config) if ((long)(config->panel_timings[1] * 1000) > pre_delay) udelay((long)(config->panel_timings[1] * 1000) - pre_delay); - gpio_set_value(config->backlight_vdd.gpio, 1); - udelay(config->panel_timings[2] * 1000); + if (fdt_gpio_isvalid(&config->backlight_vdd)) { + gpio_set_value(config->backlight_vdd.gpio, 1); + udelay(config->panel_timings[2] * 1000); + } /* Enable PWM at 15/16 high, divider 1 */ pwfm_setup(config->pwfm, 1, 0xdf, 1); diff --git a/include/fdt_decode.h b/include/fdt_decode.h index b4daac86c61..d044aff2455 100644 --- a/include/fdt_decode.h +++ b/include/fdt_decode.h @@ -111,7 +111,7 @@ struct fdt_gpio_state { }; /* This tells us whether a fdt_gpio_state record is valid or not */ -#define fdt_gpio_isvalid(gpio) ((gpio)->gpio != FDT_GPIO_NONE) +#define fdt_gpio_isvalid(x) ((x)->gpio != FDT_GPIO_NONE) #define FDT_LCD_TIMINGS 4 |