Skip to contentSkip to conversation

Platform: Samsung Q10 backlight driver

PATCH In review Frederick van der Wyck 2 participants 3 messages Jul 4, 2011 – Jul 7, 2011 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Platform: Samsung Q10 backlight driver

This driver adds backlight control on the Samsung Q10 laptop, which does not support the SABI interface. Also tested successfully on Samsung Q20, Samsung Q25 and Dell Latitude X200.

v3: Add Samsung Q20 and Samsung Q25 to dmi check.

v2: Changes suggested by Greg and Dmitry, in particular use i8042 instead of port IO and add DMI detection.

v1: The Samsung Q10 does not support the SABI interface, so the samsung-laptop driver cannot be used to control the backlight. Backlight control is not exposed via ACPI either. This driver works in the same way as the SMI handler triggered by pressing the brightness function keys.

---
 drivers/platform/x86/Kconfig       |    7 ++
 drivers/platform/x86/Makefile      |    1 +
 drivers/platform/x86/samsung-q10.c |  196 ++++++++++++++++++++++++++++++++++++
 3 files changed, 204 insertions(+), 0 deletions(-)
 create mode 100644 drivers/platform/x86/samsung-q10.c
drivers/platform/x86/Kconfig +7 -0
index 45e0191..d52968f 100644
@@ -769,4 +769,11 @@ config INTEL_OAKTRAIL
 	  enable/disable the Camera, WiFi, BT etc. devices. If in doubt, say Y
 	  here; it will only load on supported platforms.
 
+config SAMSUNG_Q10
+	tristate "Samsung Q10 Extras"
+	select BACKLIGHT_CLASS_DEVICE
+	---help---
+	  This driver provides support for backlight control on Samsung Q10
+	  and related laptops, including Dell Latitude X200.
+
 endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
index afc1f83..293a320 100644
@@ -44,3 +44,4 @@ obj-$(CONFIG_SAMSUNG_LAPTOP)	+= samsung-laptop.o
 obj-$(CONFIG_MXM_WMI)		+= mxm-wmi.o
 obj-$(CONFIG_INTEL_MID_POWER_BUTTON)	+= intel_mid_powerbtn.o
 obj-$(CONFIG_INTEL_OAKTRAIL)	+= intel_oaktrail.o
+obj-$(CONFIG_SAMSUNG_Q10)	+= samsung-q10.o
drivers/platform/x86/samsung-q10.c new file +196 -0

196 lines not on this page · raw message

#1 lore raw

Hi Frederick,

drivers/platform/x86/Kconfig config INTEL_OAKTRAIL · line 774

Quoted 4 lines · Frederick van der Wyck
drivers/platform/x86/Kconfig +3 -0
+config SAMSUNG_Q10
+	tristate "Samsung Q10 Extras"
+	select BACKLIGHT_CLASS_DEVICE

Since the driver will not function without full i8042 code being present I think you should add 'depends on SERIO_I8042' even though it compiles without it being enabled.

Thanks.

Signature · 1 line
Dmitry
#2 lore raw
Quoted 4 lines · Dmitry Torokhov

Since the driver will not function without full i8042 code being present I think you should add 'depends on SERIO_I8042' even though it compiles without it being enabled.

Thanks, Dmitry. I've added the depends on.

---
 drivers/platform/x86/Kconfig       |    8 ++
 drivers/platform/x86/Makefile      |    1 +
 drivers/platform/x86/samsung-q10.c |  196 ++++++++++++++++++++++++++++++++++++
 3 files changed, 205 insertions(+), 0 deletions(-)
 create mode 100644 drivers/platform/x86/samsung-q10.c
drivers/platform/x86/Kconfig +8 -0
index 45e0191..1e88d47 100644
@@ -769,4 +769,12 @@ config INTEL_OAKTRAIL
 	  enable/disable the Camera, WiFi, BT etc. devices. If in doubt, say Y
 	  here; it will only load on supported platforms.
 
+config SAMSUNG_Q10
+	tristate "Samsung Q10 Extras"
+	depends on SERIO_I8042
+	select BACKLIGHT_CLASS_DEVICE
+	---help---
+	  This driver provides support for backlight control on Samsung Q10
+	  and related laptops, including Dell Latitude X200.
+
 endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
index afc1f83..293a320 100644
@@ -44,3 +44,4 @@ obj-$(CONFIG_SAMSUNG_LAPTOP)	+= samsung-laptop.o
 obj-$(CONFIG_MXM_WMI)		+= mxm-wmi.o
 obj-$(CONFIG_INTEL_MID_POWER_BUTTON)	+= intel_mid_powerbtn.o
 obj-$(CONFIG_INTEL_OAKTRAIL)	+= intel_oaktrail.o
+obj-$(CONFIG_SAMSUNG_Q10)	+= samsung-q10.o
drivers/platform/x86/samsung-q10.c new file +196 -0

196 lines not on this page · raw message