From 427d637327bb4714085ea748bc5e7564ea0acfe6 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 15 Dec 2014 15:03:13 +0100 Subject: [PATCH] video: Add simple-panel support This adds support for simple panels. These are panels which don't need special handling but can have enable gpios and such. Unlike the Linux kernel implementation this one is able to understand display-timings nodes so that it's not necessary to keep a list of all known displays with their corresponding timings in barebox. Signed-off-by: Sascha Hauer --- drivers/video/Kconfig | 9 ++ drivers/video/Makefile | 1 + drivers/video/simple-panel.c | 160 +++++++++++++++++++++++++++++++++++ 3 files changed, 170 insertions(+) create mode 100644 drivers/video/simple-panel.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 663787779..323fb779f 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -117,4 +117,13 @@ config DRIVER_VIDEO_MTL017 The MTL017 is a parallel to lvds video encoder chip found on the Efika MX Smartbook. +config DRIVER_VIDEO_SIMPLE_PANEL + bool "Simple panel support" + select VIDEO_VPL + help + This enabled support for simple panels, i.e. panels which consist of + a mode definition and enable gpios in the devicetree. Unlike the + Linux Kernel implementation this one is able to understand display-timings + nodes so that it's not necessary to keep a list of all known displays + with their corresponding timings in barebox. endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 1e2109e17..eab6461cf 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_DRIVER_VIDEO_BACKLIGHT) += backlight.o obj-$(CONFIG_DRIVER_VIDEO_BACKLIGHT_PWM) += backlight-pwm.o obj-$(CONFIG_VIDEO_VPL) += vpl.o obj-$(CONFIG_DRIVER_VIDEO_MTL017) += mtl017.o +obj-$(CONFIG_DRIVER_VIDEO_SIMPLE_PANEL) += simple-panel.o obj-$(CONFIG_DRIVER_VIDEO_ATMEL) += atmel_lcdfb.o atmel_lcdfb_core.o obj-$(CONFIG_DRIVER_VIDEO_ATMEL_HLCD) += atmel_hlcdfb.o atmel_lcdfb_core.o diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c new file mode 100644 index 000000000..dceedc60c --- /dev/null +++ b/drivers/video/simple-panel.c @@ -0,0 +1,160 @@ +/* + * simple panel support for barebox + * + * (C) Copyright 2014 Sascha Hauer, Pengutronix + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include