Skip to contentSkip to conversation

backlight: Add backlight framework to support backlight driver

PATCH In review Gregory CLEMENT 1 participant 1 message Oct 6, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 backlight: Add backlight framework to support backlight driver

---
 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
index 28bcfed..e3e6894 100644
@@ -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
index 66b08d8..a619b09 100644
@@ -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/
\ No newline at end of file
drivers/video/backlight/Kconfig new file +8 -0
new file mode 100644
index 0000000..b593a82
@@ -0,0 +1,8 @@
+#
+# Backlight configuration
+#
+
+menuconfig BACKLIGHT
+	bool "Backlight support"
+	help
+	  Add support for backlight
drivers/video/backlight/Makefile new file +1 -0
new file mode 100644
index 0000000..3c63230
@@ -0,0 +1 @@
+obj-$(CONFIG_BACKLIGHT) += backlight.o
\ No newline at end of file
drivers/video/backlight/backlight.c new file +85 -0

85 lines not on this page · raw message

include/backlight.h new file +21 -0
new file mode 100644
index 0000000..7785c63
@@ -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