backlight: Add backlight framework to support backlight driver
Subsystems (2)
PATCH 1/2 backlight: Add backlight framework to support backlight driver
Signed-off-by Gregory CLEMENT <[email protected]>
--- drivers/video/Kconfig | 3 +- drivers/video/Makefile | 2 + drivers/video/backlight/Kconfig | 8 +++ drivers/video/backlight/Makefile | 1 + drivers/video/backlight/backlight.c | 85 +++++++++++++++++++++++++++++++++++ include/backlight.h | 21 +++++++++ 6 files changed, 119 insertions(+), 1 deletions(-) create mode 100644 drivers/video/backlight/Kconfig create mode 100644 drivers/video/backlight/Makefile create mode 100644 drivers/video/backlight/backlight.c create mode 100644 include/backlight.h
drivers/video/Kconfig +2 -1
@@ -39,5 +39,6 @@ config DRIVER_VIDEO_S3C_VERBOSE bool "S3C244x verbose framebuffer info" endif - +source "drivers/video/backlight/Kconfig" endif +
drivers/video/Makefile +2 -0
@@ -4,3 +4,5 @@ obj-$(CONFIG_DRIVER_VIDEO_STM) += stm.o obj-$(CONFIG_DRIVER_VIDEO_IMX) += imx.o obj-$(CONFIG_DRIVER_VIDEO_IMX_IPU) += imx-ipu-fb.o obj-$(CONFIG_DRIVER_VIDEO_S3C) += s3c.o + +obj-$(CONFIG_BACKLIGHT) += backlight/
drivers/video/backlight/Kconfig new file +8 -0
@@ -0,0 +1,8 @@ +# +# Backlight configuration +# + +menuconfig BACKLIGHT + bool "Backlight support" + help + Add support for backlight
drivers/video/backlight/Makefile new file +1 -0
@@ -0,0 +1 @@ +obj-$(CONFIG_BACKLIGHT) += backlight.o
drivers/video/backlight/backlight.c new file +85 -0
85 lines not on this page · raw message
include/backlight.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* backlight.h - definitions for the barebox backlight framework +* +* Copyright (C) 2011 Gregory Clement, Free Electrons +* +* This file is released under the GPLv2 or later +* +*/ + +#ifndef BACKLIGHT_H +#define BACKLIGHT_H + +struct backlight_dev { +struct device_d dev; +void *priv; +int (*set_brightness) (struct backlight_dev *backlight,int percent); +}; + +int register_backlight (struct backlight_dev *backlight); + +#endif /* BACKLIGHT_H */
Signature · 9 lines
1.7.4.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox