This patch adds support for powering on and off the Samsung LTV350QV
LCD panel via SPI. The driver responds to framebuffer power
management, it powers off the panel on reboot/halt/poweroff, and it
can also be controlled through sysfs. The panel is powered up when the
module is loaded and off when the module is unloaded.Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
This driver is necessary to see any output from the newly merged
atmel_lcdfb driver on ATSTK1000 boards. Therefore I would really like to
see this driver merged before 2.6.22. I do realize it's late in the
release cycle, so no hard feelings if you don't think it's appropriate.The driver has been included in Atmel's AVR32 Linux BSP for a while, but
I've recently cleaned it up to use symbolic constants instead of
hardcoded voodoo magic (we received additional documentation from
Samsung recently that allowed me to do this.)This version also fixes a longstanding bug where the driver wrote to the
wrong registers, causing the gamma registers and the PWRCTL2 register to
end up with the wrong values.drivers/video/backlight/Kconfig | 38 ++++--
drivers/video/backlight/Makefile | 2 +
drivers/video/backlight/ltv350qv.c | 309 ++++++++++++++++++++++++++++++++++++
drivers/video/backlight/ltv350qv.h | 95 +++++++++++
4 files changed, 434 insertions(+), 10 deletions(-)diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index fbef663..b6f936a 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -8,26 +8,44 @@ menuconfig BACKLIGHT_LCD_SUPPORT
Enable this to be able to choose the drivers for controlling the
backlight and the LCD panel on some platforms, for example on PDAs.-config BACKLIGHT_CLASS_DEVICE
- tristate "Lowlevel Backlight controls"
+#
+# LCD
+#
+config LCD_CLASS_DEVICE
+ tristate "Lowlevel LCD controls"
depends on BACKLIGHT_LCD_SUPPORT
default m
help
- This framework adds supp...
The LCD class device bits look fine to me. The only change I'd request
is not to change the order of things in drivers/video/backlight/Kconfig.
If you do want to reword one of those entries (which is what I think you
wanted to do), send it as a separate patch please.David, any objections to the SPI bits?
Richard
-
One significant issue was screwed up sequencing causing
tools like 'xconfig' to display things wrong. AppendedThey seemed fine to me, other than the write_reg() macro
having an embedded 'goto' ... explicitly against the
Documentation/CodingStyle guidelines. ("Chapter 12",
point 1 = "macros that affect code flow".)I like seeing more of the SPI drivers go upstream. ;)
====== CUT HERE
Switch the order of LCD_CLASS_DEVICE and BACKLIGHT_CLASS_DEVICE,
so that it's possible to insert LCD devices without borking the
dependency displays of xconfig and other config tools.Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
---
drivers/video/backlight/Kconfig | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)--- g26.orig/drivers/video/backlight/Kconfig 2007-05-29 14:31:41.000000000 -0700
+++ g26/drivers/video/backlight/Kconfig 2007-05-29 14:33:29.000000000 -0700
@@ -8,26 +8,32 @@ menuconfig BACKLIGHT_LCD_SUPPORT
Enable this to be able to choose the drivers for controlling the
backlight and the LCD panel on some platforms, for example on PDAs.-config BACKLIGHT_CLASS_DEVICE
- tristate "Lowlevel Backlight controls"
+#
+# LCD
+#
+config LCD_CLASS_DEVICE
+ tristate "Lowlevel LCD controls"
depends on BACKLIGHT_LCD_SUPPORT
default m
help
- This framework adds support for low-level control of the LCD
- backlight. This includes support for brightness and power.
+ This framework adds support for low-level control of LCD.
+ Some framebuffer devices connect to platform-specific LCD modules
+ in order to have a platform-specific way to control the flat panel
+ (contrast and applying power to the LCD (not to the backlight!)).To have support for your specific LCD panel you will have to
select the proper drivers which depend on this option.-config LCD_CLASS_DEVICE
- tristate "Lowlevel LCD controls"
+#
+# Backlight
+#
+config BACKLIGHT_CLASS_DEVICE
+ ...
Put it like that, applied, thanks. :)
Yes, even if it will make the code more ugly in a way, I think it needs
;)
Cheers,
Richard
-
This patch adds support for powering on and off the Samsung LTV350QV
LCD panel via SPI. The driver responds to framebuffer power
management, it powers off the panel on reboot/halt/poweroff, and it
can also be controlled through sysfs. The panel is powered up when the
module is loaded and off when the module is unloaded.Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
---
I agree that the write_reg() macro with embedded goto is ugly, so I've
removed it. I've also added some code that tries to recover by powering
down the display if the power-on sequence fails halfway through.The driver has been rebased onto
http://git.o-hand.com/?p=linux-rpurdie-backlight;a=shortlog;h=for-mmso it should apply nicely on top of David's Kconfig patch.
drivers/video/backlight/Kconfig | 12 ++
drivers/video/backlight/Makefile | 2 +
drivers/video/backlight/ltv350qv.c | 340 ++++++++++++++++++++++++++++++++++++
drivers/video/backlight/ltv350qv.h | 95 ++++++++++
4 files changed, 449 insertions(+), 0 deletions(-)diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
index 2580f5f..b6f936a 100644
--- a/drivers/video/backlight/Kconfig
+++ b/drivers/video/backlight/Kconfig
@@ -24,6 +24,18 @@ config LCD_CLASS_DEVICE
To have support for your specific LCD panel you will have to
select the proper drivers which depend on this option.+config LCD_LTV350QV
+ tristate "Samsung LTV350QV LCD Panel"
+ depends on LCD_CLASS_DEVICE && SPI_MASTER
+ default n
+ help
+ If you have a Samsung LTV350QV LCD panel, say y to include a
+ power control driver for it. The panel starts up in power
+ off state, so you need this driver in order to see any
+ output.
+
+ The LTV350QV panel is present on all ATSTK1000 boards.
+
#
# Backlight
#
diff --git a/drivers/video/backlight/Makefile b/drivers/video/backlight/Makefile
index c6e2266..965a78b 100644
--- a/drivers/video/backlight/Makefile
+++ b/drivers/video/backlight/Makefile
@...
| Hiten Pandya | Re: up? (emacs docbook xml ide) |
| Martin Michlmayr | Network slowdown due to CFS |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
git: | |
| Christos Zoulas | Re: Boot device confusion |
| Manuel Bouyer | Re: NFSv3 bug |
| Anders Magnusson | Re: setsockopt() compat issue |
| Martin Husemann | Re: Compressed vnd handling tested successfully |
