linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM.
@ 2014-07-04  2:26 Michael Welling
       [not found] ` <1404440796-11090-1-git-send-email-mwelling-EkmVulN54Sk@public.gmane.org>
  2014-10-17 12:19 ` [PATCH] drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header Alexandre Belloni
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Welling @ 2014-07-04  2:26 UTC (permalink / raw)
  To: Nicolas Ferre, Jean-Christophe Plagniol-Villard,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA
  Cc: Michael Welling

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>
---
 .../devicetree/bindings/video/atmel,lcdc.txt       |    1 +
 drivers/video/fbdev/atmel_lcdfb.c                  |    3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/video/atmel,lcdc.txt
index 1ec175e..b75af94 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):
 
 Optional properties (as per of_videomode_helper):
  - atmel,lcdcon-backlight: enable backlight
+ - atmel,lcdcon-backlight-inverted: invert backlight PWM polarity
  - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG"
  - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed)
 
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index d36e830..92640d4 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)
 
 	/* contrast pwm can be 'inverted' */
 	if (pdata->lcdcon_pol_negative)
-			contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE);
+		contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE);
 
 	/* have some default contrast/backlight settings */
 	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
@@ -1097,6 +1097,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
 	pdata->lcd_wiring_mode = ret;
 
 	pdata->lcdcon_is_backlight = of_property_read_bool(display_np, "atmel,lcdcon-backlight");
+	pdata->lcdcon_pol_negative = of_property_read_bool(display_np, "atmel,lcdcon-backlight-inverted");
 
 	timings = of_get_display_timings(display_np);
 	if (!timings) {
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM.
       [not found] ` <1404440796-11090-1-git-send-email-mwelling-EkmVulN54Sk@public.gmane.org>
@ 2014-07-04 13:28   ` Nicolas Ferre
  2014-07-30 11:14   ` Tomi Valkeinen
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Ferre @ 2014-07-04 13:28 UTC (permalink / raw)
  To: Michael Welling, Jean-Christophe Plagniol-Villard,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA, Tomi Valkeinen

On 04/07/2014 04:26, Michael Welling :
> 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>

Seems good


Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>


> ---
>  .../devicetree/bindings/video/atmel,lcdc.txt       |    1 +
>  drivers/video/fbdev/atmel_lcdfb.c                  |    3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/video/atmel,lcdc.txt b/Documentation/devicetree/bindings/video/atmel,lcdc.txt
> index 1ec175e..b75af94 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):
>  
>  Optional properties (as per of_videomode_helper):
>   - atmel,lcdcon-backlight: enable backlight
> + - atmel,lcdcon-backlight-inverted: invert backlight PWM polarity
>   - atmel,lcd-wiring-mode: lcd wiring mode "RGB" or "BRG"
>   - atmel,power-control-gpio: gpio to power on or off the LCD (as many as needed)
>  
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index d36e830..92640d4 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)
>  
>  	/* contrast pwm can be 'inverted' */
>  	if (pdata->lcdcon_pol_negative)
> -			contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE);
> +		contrast_ctr &= ~(ATMEL_LCDC_POL_POSITIVE);
>  
>  	/* have some default contrast/backlight settings */
>  	lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, contrast_ctr);
> @@ -1097,6 +1097,7 @@ static int atmel_lcdfb_of_init(struct atmel_lcdfb_info *sinfo)
>  	pdata->lcd_wiring_mode = ret;
>  
>  	pdata->lcdcon_is_backlight = of_property_read_bool(display_np, "atmel,lcdcon-backlight");
> +	pdata->lcdcon_pol_negative = of_property_read_bool(display_np, "atmel,lcdcon-backlight-inverted");
>  
>  	timings = of_get_display_timings(display_np);
>  	if (!timings) {
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM.
       [not found] ` <1404440796-11090-1-git-send-email-mwelling-EkmVulN54Sk@public.gmane.org>
  2014-07-04 13:28   ` Nicolas Ferre
@ 2014-07-30 11:14   ` Tomi Valkeinen
  1 sibling, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2014-07-30 11:14 UTC (permalink / raw)
  To: Michael Welling, Nicolas Ferre, Jean-Christophe Plagniol-Villard,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-fbdev-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 518 bytes --]

On 04/07/14 05:26, Michael Welling wrote:
> 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>
> ---
>  .../devicetree/bindings/video/atmel,lcdc.txt       |    1 +
>  drivers/video/fbdev/atmel_lcdfb.c                  |    3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)

Thanks, queued for 3.17.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header
  2014-07-04  2:26 [PATCH] drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM Michael Welling
       [not found] ` <1404440796-11090-1-git-send-email-mwelling-EkmVulN54Sk@public.gmane.org>
@ 2014-10-17 12:19 ` Alexandre Belloni
  2014-10-20 12:21   ` Nicolas Ferre
  1 sibling, 1 reply; 6+ messages in thread
From: Alexandre Belloni @ 2014-10-17 12:19 UTC (permalink / raw)
  To: linux-arm-kernel

Remove unnecessary mach/cpu.h header to be able to converge to a multiplatform
kernel.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
---
 drivers/video/fbdev/atmel_lcdfb.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 1d8bdb92939b..ea45a30fd4d2 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -26,7 +26,6 @@
 #include <video/of_display_timing.h>
 #include <video/videomode.h>
 
-#include <mach/cpu.h>
 #include <asm/gpio.h>
 
 #include <video/atmel_lcdc.h>
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header
  2014-10-17 12:19 ` [PATCH] drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header Alexandre Belloni
@ 2014-10-20 12:21   ` Nicolas Ferre
  2014-10-22  7:02     ` Tomi Valkeinen
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Ferre @ 2014-10-20 12:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 17/10/2014 14:19, Alexandre Belloni :
> Remove unnecessary mach/cpu.h header to be able to converge to a multiplatform
> kernel.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

Thanks.

Tomi, can you take it?

Bye,

> ---
>  drivers/video/fbdev/atmel_lcdfb.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
> index 1d8bdb92939b..ea45a30fd4d2 100644
> --- a/drivers/video/fbdev/atmel_lcdfb.c
> +++ b/drivers/video/fbdev/atmel_lcdfb.c
> @@ -26,7 +26,6 @@
>  #include <video/of_display_timing.h>
>  #include <video/videomode.h>
>  
> -#include <mach/cpu.h>
>  #include <asm/gpio.h>
>  
>  #include <video/atmel_lcdc.h>
> 


-- 
Nicolas Ferre

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header
  2014-10-20 12:21   ` Nicolas Ferre
@ 2014-10-22  7:02     ` Tomi Valkeinen
  0 siblings, 0 replies; 6+ messages in thread
From: Tomi Valkeinen @ 2014-10-22  7:02 UTC (permalink / raw)
  To: linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On 20/10/14 15:21, Nicolas Ferre wrote:
> On 17/10/2014 14:19, Alexandre Belloni :
>> Remove unnecessary mach/cpu.h header to be able to converge to a multiplatform
>> kernel.
>>
>> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 
> Thanks.
> 
> Tomi, can you take it?

Thanks, queued for 3.18 fixes.

 Tomi




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-10-22  7:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-04  2:26 [PATCH] drivers: video: fbdev: atmel_lcdfb.c: Add ability to inverted backlight PWM Michael Welling
     [not found] ` <1404440796-11090-1-git-send-email-mwelling-EkmVulN54Sk@public.gmane.org>
2014-07-04 13:28   ` Nicolas Ferre
2014-07-30 11:14   ` Tomi Valkeinen
2014-10-17 12:19 ` [PATCH] drivers: video: fbdev: atmel_lcdfb.c: remove unnecessary header Alexandre Belloni
2014-10-20 12:21   ` Nicolas Ferre
2014-10-22  7:02     ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).