summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panel/panel-sony-acx565akm.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-08-13 23:11:00 +0300
committerSam Ravnborg <sam@ravnborg.org>2019-08-14 22:23:11 +0200
commit415b8dd087118829fd37548b0d75592e297c1fa9 (patch)
treeb007098e7aa36401cc607f17b73a15de57486174 /drivers/gpu/drm/panel/panel-sony-acx565akm.c
parent1c8fc3f0c5d280d691c330388666c3726fa525c7 (diff)
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190813201101.30980-9-laurent.pinchart@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/panel/panel-sony-acx565akm.c')
-rw-r--r--drivers/gpu/drm/panel/panel-sony-acx565akm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/panel/panel-sony-acx565akm.c b/drivers/gpu/drm/panel/panel-sony-acx565akm.c
index 28d900d60f2d..305259b58767 100644
--- a/drivers/gpu/drm/panel/panel-sony-acx565akm.c
+++ b/drivers/gpu/drm/panel/panel-sony-acx565akm.c
@@ -31,10 +31,10 @@
#include <drm/drm_modes.h>
#include <drm/drm_panel.h>
-#define CTRL_DISP_BRIGHTNESS_CTRL_ON (1 << 5)
-#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON (1 << 4)
-#define CTRL_DISP_BACKLIGHT_ON (1 << 2)
-#define CTRL_DISP_AUTO_BRIGHTNESS_ON (1 << 1)
+#define CTRL_DISP_BRIGHTNESS_CTRL_ON BIT(5)
+#define CTRL_DISP_AMBIENT_LIGHT_CTRL_ON BIT(4)
+#define CTRL_DISP_BACKLIGHT_ON BIT(2)
+#define CTRL_DISP_AUTO_BRIGHTNESS_ON BIT(1)
#define MIPID_CMD_WRITE_CABC 0x55
#define MIPID_CMD_READ_CABC 0x56
@@ -621,7 +621,7 @@ static int acx565akm_probe(struct spi_device *spi)
int ret;
lcd = devm_kzalloc(&spi->dev, sizeof(*lcd), GFP_KERNEL);
- if (lcd == NULL)
+ if (!lcd)
return -ENOMEM;
spi_set_drvdata(spi, lcd);