All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module
@ 2008-12-18  4:06 Manikandan Pillai
  2008-12-18  9:17 ` Koen Kooi
  0 siblings, 1 reply; 6+ messages in thread
From: Manikandan Pillai @ 2008-12-18  4:06 UTC (permalink / raw)
  To: linux-omap, broonie; +Cc: Manikandan Pillai

This patch provides support for LCD backlight enable and disable
for OMAP3 EVM using TPS6235x based PR785 boards.

Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
---
 drivers/video/omap/lcd_omap3evm.c |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/lcd_omap3evm.c
index 4f373b2..0ea35ba 100644
--- a/drivers/video/omap/lcd_omap3evm.c
+++ b/drivers/video/omap/lcd_omap3evm.c
@@ -49,6 +49,9 @@
 #define TWL_PWMA_PWMAON		0x00
 #define TWL_PWMA_PWMAOFF	0x01
 
+/* GPIO on which Backlight can be switched ON/OFF */
+#define	LCD_OMAP3_BKLIGHT_GPIO	141
+
 static unsigned int bklight_level;
 
 static int omap3evm_panel_init(struct lcd_panel *panel,
@@ -71,6 +74,10 @@ static int omap3evm_panel_init(struct lcd_panel *panel,
 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
 #endif
+#if defined(CONFIG_PR785)
+	gpio_request(LCD_OMAP3_BKLIGHT_GPIO, "AE6_34XX_GPIO141");
+#endif
+
 	bklight_level = 100;
 
 	return 0;
@@ -108,7 +115,20 @@ static int omap3evm_bklight_setlevel(struct lcd_panel *panel,
 	}
 	return 0;
 #endif
-	/* Fix this once patch fix is sent out for TPS-boards */
+
+#if defined(CONFIG_OMAP3EVM_PR785)
+	bklight_level = level;
+	/* if it is PR785 card the backlight can only be enabled or disable
+	we will use values <=15 for disable and rest as enabled */
+	if (level <= 15)
+		/* Switch of the backlight for level values <=10 */
+		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 0);
+	else
+		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 1);
+
+	return 0;
+#endif
+	/* if neither of them is defined, it's an error */
 	return -1;
 }
 
-- 
1.5.6


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

* Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module
  2008-12-18  4:06 [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module Manikandan Pillai
@ 2008-12-18  9:17 ` Koen Kooi
  2008-12-18  9:34   ` Pillai, Manikandan
  0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2008-12-18  9:17 UTC (permalink / raw)
  To: Manikandan Pillai; +Cc: linux-omap, broonie

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


Op 18 dec 2008, om 05:06 heeft Manikandan Pillai het volgende  
geschreven:

> This patch provides support for LCD backlight enable and disable
> for OMAP3 EVM using TPS6235x based PR785 boards.


Could you hook into the backlight class for this please?

regards,

Koen


>
>
> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
> ---
> drivers/video/omap/lcd_omap3evm.c |   22 +++++++++++++++++++++-
> 1 files changed, 21 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/ 
> lcd_omap3evm.c
> index 4f373b2..0ea35ba 100644
> --- a/drivers/video/omap/lcd_omap3evm.c
> +++ b/drivers/video/omap/lcd_omap3evm.c
> @@ -49,6 +49,9 @@
> #define TWL_PWMA_PWMAON		0x00
> #define TWL_PWMA_PWMAOFF	0x01
>
> +/* GPIO on which Backlight can be switched ON/OFF */
> +#define	LCD_OMAP3_BKLIGHT_GPIO	141
> +
> static unsigned int bklight_level;
>
> static int omap3evm_panel_init(struct lcd_panel *panel,
> @@ -71,6 +74,10 @@ static int omap3evm_panel_init(struct lcd_panel  
> *panel,
> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
> #endif
> +#if defined(CONFIG_PR785)
> +	gpio_request(LCD_OMAP3_BKLIGHT_GPIO, "AE6_34XX_GPIO141");
> +#endif
> +
> 	bklight_level = 100;
>
> 	return 0;
> @@ -108,7 +115,20 @@ static int omap3evm_bklight_setlevel(struct  
> lcd_panel *panel,
> 	}
> 	return 0;
> #endif
> -	/* Fix this once patch fix is sent out for TPS-boards */
> +
> +#if defined(CONFIG_OMAP3EVM_PR785)
> +	bklight_level = level;
> +	/* if it is PR785 card the backlight can only be enabled or disable
> +	we will use values <=15 for disable and rest as enabled */
> +	if (level <= 15)
> +		/* Switch of the backlight for level values <=10 */
> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 0);
> +	else
> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 1);
> +
> +	return 0;
> +#endif
> +	/* if neither of them is defined, it's an error */
> 	return -1;
> }
>
> -- 
> 1.5.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* RE: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module
  2008-12-18  9:17 ` Koen Kooi
@ 2008-12-18  9:34   ` Pillai, Manikandan
  2008-12-18  9:41     ` Koen Kooi
  0 siblings, 1 reply; 6+ messages in thread
From: Pillai, Manikandan @ 2008-12-18  9:34 UTC (permalink / raw)
  To: Koen Kooi; +Cc: linux-omap, broonie

Hi,

For OMAP we do not have the backlight class support. 
That's the reason I am hooking the LCD control to the existing framework
which is available in lcd_omap3evm.c.

The sys fs interface is also provided and can be controlled by writing to

/sys/devices/platform/omapfb/panel/backlight_level.

Regards
Mani

-----Original Message-----
From: Koen Kooi [mailto:k.kooi@student.utwente.nl] 
Sent: Thursday, December 18, 2008 2:47 PM
To: Pillai, Manikandan
Cc: linux-omap@vger.kernel.org; broonie@sirena.org.uk
Subject: Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module


Op 18 dec 2008, om 05:06 heeft Manikandan Pillai het volgende  
geschreven:

> This patch provides support for LCD backlight enable and disable
> for OMAP3 EVM using TPS6235x based PR785 boards.


Could you hook into the backlight class for this please?

regards,

Koen


>
>
> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
> ---
> drivers/video/omap/lcd_omap3evm.c |   22 +++++++++++++++++++++-
> 1 files changed, 21 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/ 
> lcd_omap3evm.c
> index 4f373b2..0ea35ba 100644
> --- a/drivers/video/omap/lcd_omap3evm.c
> +++ b/drivers/video/omap/lcd_omap3evm.c
> @@ -49,6 +49,9 @@
> #define TWL_PWMA_PWMAON		0x00
> #define TWL_PWMA_PWMAOFF	0x01
>
> +/* GPIO on which Backlight can be switched ON/OFF */
> +#define	LCD_OMAP3_BKLIGHT_GPIO	141
> +
> static unsigned int bklight_level;
>
> static int omap3evm_panel_init(struct lcd_panel *panel,
> @@ -71,6 +74,10 @@ static int omap3evm_panel_init(struct lcd_panel  
> *panel,
> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
> #endif
> +#if defined(CONFIG_PR785)
> +	gpio_request(LCD_OMAP3_BKLIGHT_GPIO, "AE6_34XX_GPIO141");
> +#endif
> +
> 	bklight_level = 100;
>
> 	return 0;
> @@ -108,7 +115,20 @@ static int omap3evm_bklight_setlevel(struct  
> lcd_panel *panel,
> 	}
> 	return 0;
> #endif
> -	/* Fix this once patch fix is sent out for TPS-boards */
> +
> +#if defined(CONFIG_OMAP3EVM_PR785)
> +	bklight_level = level;
> +	/* if it is PR785 card the backlight can only be enabled or disable
> +	we will use values <=15 for disable and rest as enabled */
> +	if (level <= 15)
> +		/* Switch of the backlight for level values <=10 */
> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 0);
> +	else
> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 1);
> +
> +	return 0;
> +#endif
> +	/* if neither of them is defined, it's an error */
> 	return -1;
> }
>
> -- 
> 1.5.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>


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

* Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module
  2008-12-18  9:34   ` Pillai, Manikandan
@ 2008-12-18  9:41     ` Koen Kooi
  2008-12-18 10:17       ` Koen Kooi
  0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2008-12-18  9:41 UTC (permalink / raw)
  To: Pillai, Manikandan; +Cc: linux-omap, broonie

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


Op 18 dec 2008, om 10:34 heeft Pillai, Manikandan het volgende  
geschreven:

> Hi,
>
> For OMAP we do not have the backlight class support.

I know that and it's *very* annoying that TI insist on using some non- 
standard control instead of using something like the backlight class

> That's the reason I am hooking the LCD control to the existing  
> framework
> which is available in lcd_omap3evm.c.

I'm aware of that, it annoys me to no end that I have to patch all  
userspace (and HAL) to teach it about the TI way of doing backlight  
instead of having it Just Work(TM) with the backlight class. So, could  
you please hook it up to the backlight class?

regards,

Koen

>
>
> The sys fs interface is also provided and can be controlled by  
> writing to
>
> /sys/devices/platform/omapfb/panel/backlight_level.
>
> Regards
> Mani
>
> -----Original Message-----
> From: Koen Kooi [mailto:k.kooi@student.utwente.nl]
> Sent: Thursday, December 18, 2008 2:47 PM
> To: Pillai, Manikandan
> Cc: linux-omap@vger.kernel.org; broonie@sirena.org.uk
> Subject: Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using  
> TPS6235x based power module
>
>
> Op 18 dec 2008, om 05:06 heeft Manikandan Pillai het volgende
> geschreven:
>
>> This patch provides support for LCD backlight enable and disable
>> for OMAP3 EVM using TPS6235x based PR785 boards.
>
>
> Could you hook into the backlight class for this please?
>
> regards,
>
> Koen
>
>
>>
>>
>> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
>> ---
>> drivers/video/omap/lcd_omap3evm.c |   22 +++++++++++++++++++++-
>> 1 files changed, 21 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/
>> lcd_omap3evm.c
>> index 4f373b2..0ea35ba 100644
>> --- a/drivers/video/omap/lcd_omap3evm.c
>> +++ b/drivers/video/omap/lcd_omap3evm.c
>> @@ -49,6 +49,9 @@
>> #define TWL_PWMA_PWMAON		0x00
>> #define TWL_PWMA_PWMAOFF	0x01
>>
>> +/* GPIO on which Backlight can be switched ON/OFF */
>> +#define	LCD_OMAP3_BKLIGHT_GPIO	141
>> +
>> static unsigned int bklight_level;
>>
>> static int omap3evm_panel_init(struct lcd_panel *panel,
>> @@ -71,6 +74,10 @@ static int omap3evm_panel_init(struct lcd_panel
>> *panel,
>> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
>> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
>> #endif
>> +#if defined(CONFIG_PR785)
>> +	gpio_request(LCD_OMAP3_BKLIGHT_GPIO, "AE6_34XX_GPIO141");
>> +#endif
>> +
>> 	bklight_level = 100;
>>
>> 	return 0;
>> @@ -108,7 +115,20 @@ static int omap3evm_bklight_setlevel(struct
>> lcd_panel *panel,
>> 	}
>> 	return 0;
>> #endif
>> -	/* Fix this once patch fix is sent out for TPS-boards */
>> +
>> +#if defined(CONFIG_OMAP3EVM_PR785)
>> +	bklight_level = level;
>> +	/* if it is PR785 card the backlight can only be enabled or disable
>> +	we will use values <=15 for disable and rest as enabled */
>> +	if (level <= 15)
>> +		/* Switch of the backlight for level values <=10 */
>> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 0);
>> +	else
>> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 1);
>> +
>> +	return 0;
>> +#endif
>> +	/* if neither of them is defined, it's an error */
>> 	return -1;
>> }
>>
>> -- 
>> 1.5.6
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-
>> omap" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
>
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module
  2008-12-18  9:41     ` Koen Kooi
@ 2008-12-18 10:17       ` Koen Kooi
  2008-12-18 11:21         ` Koen Kooi
  0 siblings, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2008-12-18 10:17 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org List
  Cc: Manikandan Pillai, broonie@sirena.org.uk Brown

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


Op 18 dec 2008, om 10:41 heeft Koen Kooi het volgende geschreven:

>
> Op 18 dec 2008, om 10:34 heeft Pillai, Manikandan het volgende  
> geschreven:
>
>> Hi,
>>
>> For OMAP we do not have the backlight class support.
>
> I know that and it's *very* annoying that TI insist on using some  
> non-standard control instead of using something like the backlight  
> class

I must nuance that statement a bit: for omap3evm there is no backlight  
class support yet, other omap platforms are using it without problems.

A quick way to use the backlight class would be to add  
set_bl_intensity and get_bl_intensity hooks in the machine file and  
reuse corgi_bl.c.

regards,

Koen


>
>
>> That's the reason I am hooking the LCD control to the existing  
>> framework
>> which is available in lcd_omap3evm.c.
>
> I'm aware of that, it annoys me to no end that I have to patch all  
> userspace (and HAL) to teach it about the TI way of doing backlight  
> instead of having it Just Work(TM) with the backlight class. So,  
> could you please hook it up to the backlight class?
>
> regards,
>
> Koen
>
>>
>>
>> The sys fs interface is also provided and can be controlled by  
>> writing to
>>
>> /sys/devices/platform/omapfb/panel/backlight_level.
>>
>> Regards
>> Mani
>>
>> -----Original Message-----
>> From: Koen Kooi [mailto:k.kooi@student.utwente.nl]
>> Sent: Thursday, December 18, 2008 2:47 PM
>> To: Pillai, Manikandan
>> Cc: linux-omap@vger.kernel.org; broonie@sirena.org.uk
>> Subject: Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using  
>> TPS6235x based power module
>>
>>
>> Op 18 dec 2008, om 05:06 heeft Manikandan Pillai het volgende
>> geschreven:
>>
>>> This patch provides support for LCD backlight enable and disable
>>> for OMAP3 EVM using TPS6235x based PR785 boards.
>>
>>
>> Could you hook into the backlight class for this please?
>>
>> regards,
>>
>> Koen
>>
>>
>>>
>>>
>>> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
>>> ---
>>> drivers/video/omap/lcd_omap3evm.c |   22 +++++++++++++++++++++-
>>> 1 files changed, 21 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/omap/
>>> lcd_omap3evm.c
>>> index 4f373b2..0ea35ba 100644
>>> --- a/drivers/video/omap/lcd_omap3evm.c
>>> +++ b/drivers/video/omap/lcd_omap3evm.c
>>> @@ -49,6 +49,9 @@
>>> #define TWL_PWMA_PWMAON		0x00
>>> #define TWL_PWMA_PWMAOFF	0x01
>>>
>>> +/* GPIO on which Backlight can be switched ON/OFF */
>>> +#define	LCD_OMAP3_BKLIGHT_GPIO	141
>>> +
>>> static unsigned int bklight_level;
>>>
>>> static int omap3evm_panel_init(struct lcd_panel *panel,
>>> @@ -71,6 +74,10 @@ static int omap3evm_panel_init(struct lcd_panel
>>> *panel,
>>> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
>>> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
>>> #endif
>>> +#if defined(CONFIG_PR785)
>>> +	gpio_request(LCD_OMAP3_BKLIGHT_GPIO, "AE6_34XX_GPIO141");
>>> +#endif
>>> +
>>> 	bklight_level = 100;
>>>
>>> 	return 0;
>>> @@ -108,7 +115,20 @@ static int omap3evm_bklight_setlevel(struct
>>> lcd_panel *panel,
>>> 	}
>>> 	return 0;
>>> #endif
>>> -	/* Fix this once patch fix is sent out for TPS-boards */
>>> +
>>> +#if defined(CONFIG_OMAP3EVM_PR785)
>>> +	bklight_level = level;
>>> +	/* if it is PR785 card the backlight can only be enabled or  
>>> disable
>>> +	we will use values <=15 for disable and rest as enabled */
>>> +	if (level <= 15)
>>> +		/* Switch of the backlight for level values <=10 */
>>> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 0);
>>> +	else
>>> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 1);
>>> +
>>> +	return 0;
>>> +#endif
>>> +	/* if neither of them is defined, it's an error */
>>> 	return -1;
>>> }
>>>
>>> -- 
>>> 1.5.6
>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-
>>> omap" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>
>>
>>
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

* Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module
  2008-12-18 10:17       ` Koen Kooi
@ 2008-12-18 11:21         ` Koen Kooi
  0 siblings, 0 replies; 6+ messages in thread
From: Koen Kooi @ 2008-12-18 11:21 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org List
  Cc: Manikandan Pillai, broonie@sirena.org.uk Brown, Richard Purdie

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

Adding the backlight class maintainer (Richard Purdie) to CC:

Op 18 dec 2008, om 11:17 heeft Koen Kooi het volgende geschreven:

>
> Op 18 dec 2008, om 10:41 heeft Koen Kooi het volgende geschreven:
>
>>
>> Op 18 dec 2008, om 10:34 heeft Pillai, Manikandan het volgende  
>> geschreven:
>>
>>> Hi,
>>>
>>> For OMAP we do not have the backlight class support.
>>
>> I know that and it's *very* annoying that TI insist on using some  
>> non-standard control instead of using something like the backlight  
>> class
>
> I must nuance that statement a bit: for omap3evm there is no  
> backlight class support yet, other omap platforms are using it  
> without problems.
>
> A quick way to use the backlight class would be to add  
> set_bl_intensity and get_bl_intensity hooks in the machine file and  
> reuse corgi_bl.c.
>
> regards,
>
> Koen
>
>
>>
>>
>>> That's the reason I am hooking the LCD control to the existing  
>>> framework
>>> which is available in lcd_omap3evm.c.
>>
>> I'm aware of that, it annoys me to no end that I have to patch all  
>> userspace (and HAL) to teach it about the TI way of doing backlight  
>> instead of having it Just Work(TM) with the backlight class. So,  
>> could you please hook it up to the backlight class?
>>
>> regards,
>>
>> Koen
>>
>>>
>>>
>>> The sys fs interface is also provided and can be controlled by  
>>> writing to
>>>
>>> /sys/devices/platform/omapfb/panel/backlight_level.
>>>
>>> Regards
>>> Mani
>>>
>>> -----Original Message-----
>>> From: Koen Kooi [mailto:k.kooi@student.utwente.nl]
>>> Sent: Thursday, December 18, 2008 2:47 PM
>>> To: Pillai, Manikandan
>>> Cc: linux-omap@vger.kernel.org; broonie@sirena.org.uk
>>> Subject: Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using  
>>> TPS6235x based power module
>>>
>>>
>>> Op 18 dec 2008, om 05:06 heeft Manikandan Pillai het volgende
>>> geschreven:
>>>
>>>> This patch provides support for LCD backlight enable and disable
>>>> for OMAP3 EVM using TPS6235x based PR785 boards.
>>>
>>>
>>> Could you hook into the backlight class for this please?
>>>
>>> regards,
>>>
>>> Koen
>>>
>>>
>>>>
>>>>
>>>> Signed-off-by: Manikandan Pillai <mani.pillai@ti.com>
>>>> ---
>>>> drivers/video/omap/lcd_omap3evm.c |   22 +++++++++++++++++++++-
>>>> 1 files changed, 21 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/drivers/video/omap/lcd_omap3evm.c b/drivers/video/ 
>>>> omap/
>>>> lcd_omap3evm.c
>>>> index 4f373b2..0ea35ba 100644
>>>> --- a/drivers/video/omap/lcd_omap3evm.c
>>>> +++ b/drivers/video/omap/lcd_omap3evm.c
>>>> @@ -49,6 +49,9 @@
>>>> #define TWL_PWMA_PWMAON		0x00
>>>> #define TWL_PWMA_PWMAOFF	0x01
>>>>
>>>> +/* GPIO on which Backlight can be switched ON/OFF */
>>>> +#define	LCD_OMAP3_BKLIGHT_GPIO	141
>>>> +
>>>> static unsigned int bklight_level;
>>>>
>>>> static int omap3evm_panel_init(struct lcd_panel *panel,
>>>> @@ -71,6 +74,10 @@ static int omap3evm_panel_init(struct lcd_panel
>>>> *panel,
>>>> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x01, TWL_PWMA_PWMAON);
>>>> 	twl4030_i2c_write_u8(TWL4030_MODULE_PWMA, 0x02, TWL_PWMA_PWMAOFF);
>>>> #endif
>>>> +#if defined(CONFIG_PR785)
>>>> +	gpio_request(LCD_OMAP3_BKLIGHT_GPIO, "AE6_34XX_GPIO141");
>>>> +#endif
>>>> +
>>>> 	bklight_level = 100;
>>>>
>>>> 	return 0;
>>>> @@ -108,7 +115,20 @@ static int omap3evm_bklight_setlevel(struct
>>>> lcd_panel *panel,
>>>> 	}
>>>> 	return 0;
>>>> #endif
>>>> -	/* Fix this once patch fix is sent out for TPS-boards */
>>>> +
>>>> +#if defined(CONFIG_OMAP3EVM_PR785)
>>>> +	bklight_level = level;
>>>> +	/* if it is PR785 card the backlight can only be enabled or  
>>>> disable
>>>> +	we will use values <=15 for disable and rest as enabled */
>>>> +	if (level <= 15)
>>>> +		/* Switch of the backlight for level values <=10 */
>>>> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 0);
>>>> +	else
>>>> +		gpio_direction_output(LCD_OMAP3_BKLIGHT_GPIO, 1);
>>>> +
>>>> +	return 0;
>>>> +#endif
>>>> +	/* if neither of them is defined, it's an error */
>>>> 	return -1;
>>>> }
>>>>
>>>> -- 
>>>> 1.5.6
>>>>
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe linux-
>>>> omap" in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>>>
>>>
>>>
>>
>


[-- Attachment #2: Dit deel van het bericht is digitaal ondertekend --]
[-- Type: application/pgp-signature, Size: 186 bytes --]

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

end of thread, other threads:[~2008-12-18 11:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-18  4:06 [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module Manikandan Pillai
2008-12-18  9:17 ` Koen Kooi
2008-12-18  9:34   ` Pillai, Manikandan
2008-12-18  9:41     ` Koen Kooi
2008-12-18 10:17       ` Koen Kooi
2008-12-18 11:21         ` Koen Kooi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.