linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shc_work@mail.ru (Alexander Shiyan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 13/15] ARM: clps711x: edb7211: Control LCD backlight via PWM
Date: Mon, 13 May 2013 21:07:35 +0400	[thread overview]
Message-ID: <1368464857-5038-16-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1368464857-5038-1-git-send-email-shc_work@mail.ru>

This patch provide control LCD backlight via PWM. GPIO is used
only for switch backlight ON and OFF.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 arch/arm/mach-clps711x/board-edb7211.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-clps711x/board-edb7211.c b/arch/arm/mach-clps711x/board-edb7211.c
index 970f4e1..9dfb990 100644
--- a/arch/arm/mach-clps711x/board-edb7211.c
+++ b/arch/arm/mach-clps711x/board-edb7211.c
@@ -109,13 +109,14 @@ static struct plat_lcd_data edb7211_lcd_power_pdata = {
 
 static void edb7211_lcd_backlight_set_intensity(int intensity)
 {
-	gpio_set_value(EDB7211_LCDBL, intensity);
+	gpio_set_value(EDB7211_LCDBL, !!intensity);
+	clps_writel((clps_readl(PMPCON) & 0xf0ff) | (intensity << 8), PMPCON);
 }
 
 static struct generic_bl_info edb7211_lcd_backlight_pdata = {
 	.name			= "lcd-backlight.0",
 	.default_intensity	= 0x01,
-	.max_intensity		= 0x01,
+	.max_intensity		= 0x0f,
 	.set_bl_intensity	= edb7211_lcd_backlight_set_intensity,
 };
 
-- 
1.8.1.5

  parent reply	other threads:[~2013-05-13 17:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 17:07 [PATCH 01/15] ARM: clps711x: Remove NEED_MACH_MEMORY_H dependency Alexander Shiyan
2013-05-13 17:07 ` [PATCH RESEND v2 1/3] GPIO: clps711x: Rewrite driver for using generic GPIO code Alexander Shiyan
2013-05-13 17:07 ` [PATCH RESEND v2 2/3] ARM: clps711x: Re-add GPIO support Alexander Shiyan
2013-05-13 17:07 ` [PATCH 02/15] ARM: clps711x: Set PLL clock to zero if we work from 13 mHz source Alexander Shiyan
2013-05-13 17:07 ` [PATCH 03/15] ARM: clps711x: autcpu12: Move LCD DPOT definitions to board file Alexander Shiyan
2013-05-13 17:07 ` [PATCH RESEND v2 3/3] GPIO: clps711x: Add DT support Alexander Shiyan
2013-05-13 17:07 ` [PATCH 04/15] ARM: clps711x: autcpu12: Add support for NOR flash Alexander Shiyan
2013-05-13 17:07 ` [PATCH 05/15] ARM: clps711x: autcpu12: Special driver for handling memory is removed Alexander Shiyan
2013-05-13 17:07 ` [PATCH 06/15] ARM: clps711x: autcpu12: Move remaining specific definitions to board file Alexander Shiyan
2013-05-13 17:07 ` [PATCH 07/15] ARM: clps711x: p720t: Define PLD registers as GPIOs Alexander Shiyan
2013-05-13 17:07 ` [PATCH 08/15] ARM: clps711x: Move specific definitions from hardware.h to boards files Alexander Shiyan
2013-05-13 17:07 ` [PATCH 09/15] ARM: clps711x: Replace "arch_initcall" in common code with ".init_early" Alexander Shiyan
2013-05-13 17:07 ` [PATCH 10/15] ARM: clps711x: Add clocksource framework Alexander Shiyan
2013-05-13 17:07 ` [PATCH 11/15] ARM: clps711x: Optimize interrupt handling Alexander Shiyan
2013-05-13 17:07 ` [PATCH 12/15] ARM: clps711x: edb7211: Add support for I2C Alexander Shiyan
2013-05-13 17:07 ` Alexander Shiyan [this message]
2013-05-13 17:07 ` [PATCH 14/15] ARM: clps711x: Add support for SYSCON driver Alexander Shiyan
2013-05-13 17:07 ` [PATCH 15/15] ARM: clps711x: Update defconfig Alexander Shiyan
2013-06-11 22:57 ` [PATCH 01/15] ARM: clps711x: Remove NEED_MACH_MEMORY_H dependency Olof Johansson
2013-06-12 15:56   ` Alexander Shiyan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1368464857-5038-16-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).