Skip to contentSkip to conversation

backlight: otm3225a: add support for ORISE OTM3225A LCD SoC

PATCH Applied Felix Brack 2 participants 2 messages Apr 8, 2018 – Apr 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 backlight: otm3225a: add support for ORISE OTM3225A LCD SoC

This patch adds a LCD driver supporting the OTM3225A LCD SoC from ORISE Technology. This device can drive TFT LC panels having a resolution of 240x320 pixels. After initializing the OTM3225A using it's SPI interface it switches to use 16-bib RGB as external display interface.

Changes in v3:
- fix a type in a comment
- don't make useless calls to msleep() by callig it with delay 0
- add Daniel Thompson's Acked-by

Changes in v2:
- use descriptive names for registers instead of hard coding them
- remove unnecessary registers in initialization sequence
- make use of resource-managed functions like devm_kzalloc() instead of kzalloc() which simplifies and shortens the code
- replace mdelay() by msleep()
- use module_spi_init() since we do not do anything special in init/exit
- use dev_name() instead of hard coding driver name multiple times
- use static storage class for structure otm3225a_ops
- sort include files alphabetically
- use standardized licensing header
- modify Makefile respecting alphabetical sort order

---
 drivers/video/backlight/Kconfig    |   7 ++
 drivers/video/backlight/Makefile   |   1 +
 drivers/video/backlight/otm3225a.c | 252 +++++++++++++++++++++++++++++++++++++
 3 files changed, 260 insertions(+)
 create mode 100644 drivers/video/backlight/otm3225a.c
drivers/video/backlight/Kconfig +7 -0
index 4e1d2ad..06e187b 100644
@@ -150,6 +150,13 @@ config LCD_HX8357
 	  If you have a HX-8357 LCD panel, say Y to enable its LCD control
 	  driver.
 
+  config LCD_OTM3225A
+  	tristate "ORISE Technology OTM3225A support"
+  	depends on SPI
+  	help
+  	  If you have a panel based on the OTM3225A controller
+  	  chip then say y to include a driver for it.
+
 endif # LCD_CLASS_DEVICE
 
 #
drivers/video/backlight/Makefile +1 -0
index 8905129..2473377 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_LCD_LD9040)		+= ld9040.o
 obj-$(CONFIG_LCD_LMS283GF05)		+= lms283gf05.o
 obj-$(CONFIG_LCD_LMS501KF03)		+= lms501kf03.o
 obj-$(CONFIG_LCD_LTV350QV)		+= ltv350qv.o
+obj-$(CONFIG_LCD_OTM3225A)		+= otm3225a.o
 obj-$(CONFIG_LCD_PLATFORM)		+= platform_lcd.o
 obj-$(CONFIG_LCD_S6E63M0)		+= s6e63m0.o
 obj-$(CONFIG_LCD_TDO24M)		+= tdo24m.o
drivers/video/backlight/otm3225a.c new file +252 -0

252 lines not on this page · raw message

Signature · 1 line
2.7.4
Applied
#1 lore raw
Quoted 27 lines · Felix Brack

This patch adds a LCD driver supporting the OTM3225A LCD SoC from ORISE Technology. This device can drive TFT LC panels having a resolution of 240x320 pixels. After initializing the OTM3225A using it's SPI interface it switches to use 16-bib RGB as external display interface.

Changes in v3:
- fix a type in a comment
- don't make useless calls to msleep() by callig it with delay 0
- add Daniel Thompson's Acked-by

Changes in v2:
- use descriptive names for registers instead of hard coding them
- remove unnecessary registers in initialization sequence
- make use of resource-managed functions like devm_kzalloc() instead of kzalloc() which simplifies and shortens the code
- replace mdelay() by msleep()
- use module_spi_init() since we do not do anything special in init/exit
- use dev_name() instead of hard coding driver name multiple times
- use static storage class for structure otm3225a_ops
- sort include files alphabetically
- use standardized licensing header
- modify Makefile respecting alphabetical sort order

Quoted 6 lines
---
 drivers/video/backlight/Kconfig    |   7 ++
 drivers/video/backlight/Makefile   |   1 +
 drivers/video/backlight/otm3225a.c | 252 +++++++++++++++++++++++++++++++++++++
 3 files changed, 260 insertions(+)
 create mode 100644 drivers/video/backlight/otm3225a.c

Applied, thanks.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog