From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z3Lf4-0004aA-3v for barebox@lists.infradead.org; Fri, 12 Jun 2015 09:54:07 +0000 From: Sascha Hauer Date: Fri, 12 Jun 2015 11:53:37 +0200 Message-Id: <1434102821-10555-2-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1434102821-10555-1-git-send-email-s.hauer@pengutronix.de> References: <1434102821-10555-1-git-send-email-s.hauer@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/6] video: Add backlight support To: Barebox List This adds a small backlight layer. It provides a backlight device on which the brightness parameter can be used to adjust the brightness. Signed-off-by: Sascha Hauer --- drivers/video/Kconfig | 4 +++ drivers/video/Makefile | 1 + drivers/video/backlight.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++ include/video/backlight.h | 20 +++++++++++ 4 files changed, 115 insertions(+) create mode 100644 drivers/video/backlight.c create mode 100644 include/video/backlight.h diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index f096a54..e108d8a 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -93,4 +93,8 @@ config DRIVER_VIDEO_EDID This enabled support for reading and parsing EDID data from an attached monitor. +config DRIVER_VIDEO_BACKLIGHT + bool "Add backlight support" + help + Enable this for backlight support. endif diff --git a/drivers/video/Makefile b/drivers/video/Makefile index ae9f6e5..0655b0f 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -1,6 +1,7 @@ obj-$(CONFIG_VIDEO) += fb.o obj-$(CONFIG_DRIVER_VIDEO_EDID) += edid.o obj-$(CONFIG_OFDEVICE) += of_display_timing.o +obj-$(CONFIG_DRIVER_VIDEO_BACKLIGHT) += backlight.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/backlight.c b/drivers/video/backlight.c new file mode 100644 index 0000000..ddde6f8 --- /dev/null +++ b/drivers/video/backlight.c @@ -0,0 +1,90 @@ +#include +#include +#include +#include