Commit 415b8dd0 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Sam Ravnborg

drm/panel: Add driver for the Toppoly TD028TTEC1 panel

This panel is used on the OpenMoko Neo FreeRunner and Neo 1973.

The code is based on the omapdrm-specific panel-tpo-td028ttec1 driver.

v2:
- fix checkpatch warnings:
  o (lcd == NULL) => (!lcd) (sam)
  o (1 << X) => BIT(X) (sam)
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190813201101.30980-9-laurent.pinchart@ideasonboard.com
parent 1c8fc3f0
...@@ -324,6 +324,14 @@ config DRM_PANEL_SONY_ACX565AKM ...@@ -324,6 +324,14 @@ config DRM_PANEL_SONY_ACX565AKM
Say Y here if you want to enable support for the Sony ACX565AKM Say Y here if you want to enable support for the Sony ACX565AKM
800x600 3.5" panel (found on the Nokia N900). 800x600 3.5" panel (found on the Nokia N900).
config DRM_PANEL_TPO_TD028TTEC1
tristate "Toppoly (TPO) TD028TTEC1 panel driver"
depends on OF && SPI
depends on BACKLIGHT_CLASS_DEVICE
help
Say Y here if you want to enable support for TPO TD028TTEC1 480x640
2.8" panel (found on the OpenMoko Neo FreeRunner and Neo 1973).
config DRM_PANEL_TPO_TPG110 config DRM_PANEL_TPO_TPG110
tristate "TPO TPG 800x400 panel" tristate "TPO TPG 800x400 panel"
depends on OF && SPI && GPIOLIB depends on OF && SPI && GPIOLIB
......
...@@ -34,5 +34,6 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o ...@@ -34,5 +34,6 @@ obj-$(CONFIG_DRM_PANEL_SHARP_LS043T1LE01) += panel-sharp-ls043t1le01.o
obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7701) += panel-sitronix-st7701.o
obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o obj-$(CONFIG_DRM_PANEL_SITRONIX_ST7789V) += panel-sitronix-st7789v.o
obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o obj-$(CONFIG_DRM_PANEL_SONY_ACX565AKM) += panel-sony-acx565akm.o
obj-$(CONFIG_DRM_PANEL_TPO_TD028TTEC1) += panel-tpo-td028ttec1.o
obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o obj-$(CONFIG_DRM_PANEL_TPO_TPG110) += panel-tpo-tpg110.o
obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o obj-$(CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA) += panel-truly-nt35597.o
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
#include <drm/drm_modes.h> #include <drm/drm_modes.h>
#include <drm/drm_panel.h> #include <drm/drm_panel.h>
#define CTRL_DISP_BRIGHTNESS_CTRL_ON (1 << 5) #define CTRL_DISP_BRIGHTNESS_CTRL_ON BIT(5)
#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON (1 << 4) #define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON BIT(4)
#define CTRL_DISP_BACKLIGHT_ON (1 << 2) #define CTRL_DISP_BACKLIGHT_ON BIT(2)
#define CTRL_DISP_AUTO_BRIGHTNESS_ON (1 << 1) #define CTRL_DISP_AUTO_BRIGHTNESS_ON BIT(1)
#define MIPID_CMD_WRITE_CABC 0x55 #define MIPID_CMD_WRITE_CABC 0x55
#define MIPID_CMD_READ_CABC 0x56 #define MIPID_CMD_READ_CABC 0x56
...@@ -621,7 +621,7 @@ static int acx565akm_probe(struct spi_device *spi) ...@@ -621,7 +621,7 @@ static int acx565akm_probe(struct spi_device *spi)
int ret; int ret;
lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL); lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL);
if (lcd == NULL) if (!lcd)
return -ENOMEM; return -ENOMEM;
spi_set_drvdata(spi, lcd); spi_set_drvdata(spi, lcd);
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment