From: Ajay Kumar Subject: [PATCH V5 04/12] drm/panel: Add driver for lvds/edp based panels Date: Fri, 18 Jul 2014 02:13:50 +0530 Message-ID: <1405629839-12086-5-git-send-email-ajaykumar.rs@samsung.com> References: <1405629839-12086-1-git-send-email-ajaykumar.rs@samsung.com> Return-path: In-reply-to: <1405629839-12086-1-git-send-email-ajaykumar.rs@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org To: dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Cc: inki.dae@samsung.com, robdclark@gmail.com, daniel.vetter@ffwll.ch, thierry.reding@gmail.com, seanpaul@google.com, ajaynumb@gmail.com, jg1.han@samsung.com, joshi@samsung.com, prashanth.g@samsung.com, javier@dowhile0.org, Ajay Kumar , Rahul Sharma List-Id: dri-devel@lists.freedesktop.org This patch adds a simple driver to handle all the LCD and LED powerup/down routines needed to support eDP/LVDS panels. The LCD and LED units are usually powered up via regulators, and almost on all boards, we will have a BACKLIGHT_EN pin to enable/ disable the backlight. Sometimes, we can have LCD_EN switches as well. The routines in this driver can be used to control panel power sequence on such boards. Signed-off-by: Ajay Kumar Signed-off-by: Rahul Sharma --- drivers/gpu/drm/panel/Kconfig | 10 ++ drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-lvds.c | 268 ++++++++++++++++++++++++++++++++++++ 3 files changed, 279 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-lvds.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 4ec874d..8fe7ee5 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -30,4 +30,14 @@ config DRM_PANEL_S6E8AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_EDP_LVDS + tristate "support for eDP/LVDS panels" + depends on OF && DRM_PANEL + select VIDEOMODE_HELPERS + help + DRM panel driver for direct eDP panels or LVDS connected + via DP bridges, that need at most a regulator for LCD unit, + a regulator for LED unit and/or enable GPIOs for LCD or LED units. + Delay values can also be specified to support powerup and + powerdown process. endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 8b92921..eaafa01 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1,3 +1,4 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o obj-$(CONFIG_DRM_PANEL_LD9040) += panel-ld9040.o obj-$(CONFIG_DRM_PANEL_S6E8AA0) += panel-s6e8aa0.o +obj-$(CONFIG_DRM_PANEL_EDP_LVDS) += panel-lvds.o diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c new file mode 100644 index 0000000..ce20587 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-lvds.c @@ -0,0 +1,268 @@ +/* + * panel driver for lvds and eDP panels + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * + * Ajay Kumar + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include + +#include