Skip to contentSkip to conversation

Platform: add Samsung Laptop platform driver

PATCH New Greg KH 1 participant 1 message Feb 27, 2011

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 Platform: add Samsung Laptop platform driver

From: Greg Kroah-Hartman <[email protected]>

This adds the samsung-laptop driver to the kernel. It now supports all known Samsung laptops that use the SABI interface.

---
 Documentation/ABI/testing/sysfs-driver-samsung-laptop |   19 
 drivers/platform/x86/Kconfig                          |   13 
 drivers/platform/x86/Makefile                         |    1 
 drivers/platform/x86/samsung-laptop.c                 |  832 ++++++++++++++++++
 4 files changed, 865 insertions(+)

Matthew, this is a copy of the latest version in the linux-next tree of the driver. Once it has been accepted into your tree, I'll delete the staging driver. Or, if you want to give your ACK, I can just move the driver from staging into this directory in my tree, which will properly preserve the history of the code.

v2 - I have also addressed all of the review comments you gave me
previously, and fixed a bug in the previous version that broke the driver on the N128 laptop, as well as added support for a wide range of other laptops thanks to many testers who sent in patches.

v3 - Added a few more device ids, const changes, and now supports
variable brightness levels as not all laptops are the same with this.

Documentation/ABI/testing/sysfs-driver-samsung-laptop new file +19 -0
new file mode 100644
index 0000000..0a81023
@@ -0,0 +1,19 @@
+What:		/sys/devices/platform/samsung/performance_level
+Date:		January 1, 2010
+KernelVersion:	2.6.33
+Contact:	Greg Kroah-Hartman <[email protected]>
+Description:	Some Samsung laptops have different "performance levels"
+		that are can be modified by a function key, and by this
+		sysfs file.  These values don't always make a whole lot
+		of sense, but some users like to modify them to keep
+		their fans quiet at all costs.  Reading from this file
+		will show the current performance level.  Writing to the
+		file can change this value.
+			Valid options:
+				"silent"
+				"normal"
+				"overclock"
+		Note that not all laptops support all of these options.
+		Specifically, not all support the "overclock" option,
+		and it's still unknown if this value even changes
+		anything, other than making the user feel a bit better.
drivers/platform/x86/Kconfig +13 -0
index a59af5b..5624267 100644
@@ -654,4 +654,17 @@ config XO1_RFKILL
 	  Support for enabling/disabling the WLAN interface on the OLPC XO-1
 	  laptop.
 
+config SAMSUNG_LAPTOP
+	tristate "Samsung Laptop driver"
+	depends on RFKILL && BACKLIGHT_CLASS_DEVICE && X86
+	---help---
+	  This module implements a driver for a wide range of different
+	  Samsung laptops.  It offers control over the different
+	  function keys, wireless LED, LCD backlight level, and
+	  sometimes provides a "performance_control" sysfs file to allow
+	  the performance level of the laptop to be changed.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called samsung-laptop.
+
 endif # X86_PLATFORM_DEVICES
drivers/platform/x86/Makefile +1 -0
index 4ec4ff8..ad2fb97 100644
@@ -34,3 +34,4 @@ obj-$(CONFIG_INTEL_IPS)		+= intel_ips.o
 obj-$(CONFIG_GPIO_INTEL_PMIC)	+= intel_pmic_gpio.o
 obj-$(CONFIG_XO1_RFKILL)	+= xo1-rfkill.o
 obj-$(CONFIG_IBM_RTL)		+= ibm_rtl.o
+obj-$(CONFIG_SAMSUNG_LAPTOP)	+= samsung-laptop.o
drivers/platform/x86/samsung-laptop.c new file +832 -0

832 lines not on this page · raw message