Re: [PATCH 1/1] LCD backlight support for OMAP3 EVM using TPS6235x based power module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx]
Sent: Thursday, December 18, 2008 2:47 PM
To: Pillai, Manikandan
Cc: linux-omap@xxxxxxxxxxxxxxx; broonie@xxxxxxxxxxxxx
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@xxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html






Attachment: PGP.sig
Description: Dit deel van het bericht is digitaal ondertekend


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux