diff options
author | Michael Welling <mwelling@ieee.org> | 2014-07-03 22:26:36 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-07-30 07:13:33 -0400 |
commit | d7aa64c32bdcb2c1bc5932b3d2927863ae31ccbc (patch) | |
tree | 21e7ef73ea70e319bdf7ad8a1c0ffd338ff6c903 | |
parent | d10715be03bd8bad59ddc50236cb140c3bd73c7b (diff) |
drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM.
The code has a variable to change the polarity of the PWM backlight control but
it was not being initialized. This patch adds a devicetree entry to set the
variable if required.
Signed-off-by: Michael Welling <mwelling@ieee.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | Documentation/devicetree/bindings/video/atmel,lcdc.txt | 1 | ||||
-rw-r--r-- | drivers/video/fbdev/atmel_lcdfb.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/video/atmel,lcdc.txt index 1ec175eddca8..b75af94a5e52 100644 --- a/Documentation/devicetree/bindings/video/atmel,lcdc.txt +++ b/Documentation/devicetree/bindings/video/atmel,lcdc.txt | |||
@@ -46,6 +46,7 @@ Required properties (as per of_videomode_helper): | |||
46 | 46 | ||
47 | Optional properties (as per of_videomode_helper): | 47 | Optional properties (as per of_videomode_helper): |
48 | - atmel,lcdcon-backlight: enable backlight | 48 | - atmel,lcdcon-backlight: enable backlight |
49 | - atmel,lcdcon-backlight-inverted: invert backlight PWM polarity | ||
49 | - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG" | 50 | - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG" |
50 | - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed) | 51 | - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed) |
51 | 52 | ||
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c index e683b6ef9594..010443f5f555 100644 --- a/drivers/video/fbdev/atmel_lcdfb.c +++ b/drivers/video/fbdev/atmel_lcdfb.c | |||
@@ -290,7 +290,7 @@ static void init_contrast(struct atmel_lcdfb_info *sinfo) | |||
290 | 290 | ||
291 | /* contrast pwm can be 'inverted' */ | 291 | /* contrast pwm can be 'inverted' */ |
292 | if (pdata->lcdcon_pol_negative) | 292 | if (pdata->lcdcon_pol_negative) |
293 | contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE); | 293 | contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE); |
294 | 294 | ||
295 | /* have some default contrast/backlight settings */ | 295 | /* have some default contrast/backlight settings */ |
296 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr); | 296 | lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr); |
@@ -1095,6 +1095,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo) | |||
1095 | pdata->lcd_wiring_mode = ret; | 1095 | pdata->lcd_wiring_mode = ret; |
1096 | 1096 | ||
1097 | pdata->lcdcon_is_backlight = of_property_read_bool(display_np, "atmel,lcdcon-backlight"); | 1097 | pdata->lcdcon_is_backlight = of_property_read_bool(display_np, "atmel,lcdcon-backlight"); |
1098 | pdata->lcdcon_pol_negative = of_property_read_bool(display_np, "atmel,lcdcon-backlight-inverted"); | ||
1098 | 1099 | ||
1099 | timings = of_get_display_timings(display_np); | 1100 | timings = of_get_display_timings(display_np); |
1100 | if (!timings) { | 1101 | if (!timings) { |