Skip to contentSkip to conversation

backlight: add lms501kf03 LCD driver

PATCH In review Jingoo Han 3 participants 3 messages Dec 18, 2012 – Dec 19, 2012

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH v2 1/1 backlight: add lms501kf03 LCD driver

Add the lms501kf03 LCD panel driver. The lms501kf03 LCD panel (800 x 480) driver uses 3-wired SPI inteface.

---
Change since v1:
- remove redundant return variables
- use -EINVAL instead of -EFAULT
- add a more detailed description of 120ms delay time
- replace unsigned short arrays with unsigned char arrays

 drivers/video/backlight/Kconfig      |    8 +
 drivers/video/backlight/Makefile     |    1 +
 drivers/video/backlight/lms501kf03.c |  444 ++++++++++++++++++++++++++++++++++
 3 files changed, 453 insertions(+), 0 deletions(-)
 create mode 100644 drivers/video/backlight/lms501kf03.c
drivers/video/backlight/Kconfig +8 -0
index 765a945..081d6cf 100644
@@ -126,6 +126,14 @@ config LCD_AMS369FG06
 	  If you have an AMS369FG06 AMOLED Panel, say Y to enable its
 	  LCD control driver.
 
+config LCD_LMS501KF03
+	tristate "LMS501KF03 LCD Driver"
+	depends on SPI
+	default n
+	help
+	  If you have an LMS501KF03 LCD Panel, say Y to enable its
+	  LCD control driver.
+
 endif # LCD_CLASS_DEVICE
 
 #
drivers/video/backlight/Makefile +1 -0
index e7ce729..d02a728 100644
@@ -14,6 +14,7 @@ obj-$(CONFIG_LCD_TOSA)		   += tosa_lcd.o
 obj-$(CONFIG_LCD_S6E63M0)	+= s6e63m0.o
 obj-$(CONFIG_LCD_LD9040)	+= ld9040.o
 obj-$(CONFIG_LCD_AMS369FG06)	+= ams369fg06.o
+obj-$(CONFIG_LCD_LMS501KF03)	+= lms501kf03.o
 
 obj-$(CONFIG_BACKLIGHT_CLASS_DEVICE) += backlight.o
 obj-$(CONFIG_BACKLIGHT_ATMEL_PWM)    += atmel-pwm-bl.o
drivers/video/backlight/lms501kf03.c new file +444 -0

444 lines not on this page · raw message

Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 10 lines · Jingoo Han

Add the lms501kf03 LCD panel driver. The lms501kf03 LCD panel (800 x 480) driver uses 3-wired SPI inteface.

---
Change since v1:
- remove redundant return variables
- use -EINVAL instead of -EFAULT
- add a more detailed description of 120ms delay time

Thanks for taking care of these comments!

#2 lore raw
In reply to Jingoo Han
Quoted 2 lines · On Tue, 18 Dec 2012 17:46:46 +0900 Jingoo Han <[email protected]> wrote:

Add the lms501kf03 LCD panel driver. The lms501kf03 LCD panel (800 x 480) driver uses 3-wired SPI inteface.

Looks OK.

Quoted 1 line

+static unsigned int before_power;

This is unused. Can I zap it?

drivers/video/backlight/lms501kf03.c renamed from drivers/video/backlight/lms501kf03.c~backlight-add-lms501kf03-lcd-driver-fix +0 -3
@@ -388,7 +388,6 @@ static int lms501kf03_remove(struct spi_
 }
 
 #if defined(CONFIG_PM)
-static unsigned int before_power;
 
 static int lms501kf03_suspend(struct spi_device *spi, pm_message_t mesg)
 {
@@ -396,8 +395,6 @@ static int lms501kf03_suspend(struct spi
 
 	dev_dbg(&spi->dev, "lcd->power = %d\n", lcd->power);
 
-	before_power = lcd->power;
-
 	/*
 	 * when lcd panel is suspend, lcd panel becomes off
 	 * regardless of status.

_