Skip to contentSkip to conversation

v3 - Add Dell Business Class Netbook LED driver

PATCH In review Bob Rodgers 2 participants 2 messages Feb 17, 2010 LED

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 v3 - Add Dell Business Class Netbook LED driver

This patch adds an LED driver to support the Dell Activity LED on the Dell Latitude 2100 netbook and future products to come. The Activity LED is visible externally in the lid so classroom instructors can observe it from a distance. The driver uses the sysfs led_class and provides a standard LED interface. This driver is ready for submission upstream.

Signed-off by: Bob Rodgers <[email protected]>

---
Description of changes in v3:
1) Better error handling for wmi_evaluate_method()
2) Eliminated leak of obj when obj is not NULL and is not a buffer.
3) Removed printk() as they were only helpful in debugging.
4) Removed #include <linux/platform_device.h>

Description of changes in v2:
1) Added X86 and ACPI_WMI dependencies to the Kconfig file.
2) Removed platform_driver and platform_device as they are not needed in this driver.

 drivers/leds/Kconfig    |    7 ++
 drivers/leds/Makefile   |    1 +
 drivers/leds/dell-led.c |  200 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 208 insertions(+), 0 deletions(-)
 create mode 100644 drivers/leds/dell-led.c
drivers/leds/Kconfig +7 -0
index 8a0e1ec..ce8ca57 100644
@@ -269,6 +269,13 @@ config LEDS_ADP5520
 	  To compile this driver as a module, choose M here: the module will
 	  be called leds-adp5520.
 
+config LEDS_DELL_NETBOOKS
+	tristate "External LED on Dell Business Netbooks"
+	depends on LEDS_CLASS && X86 && ACPI_WMI
+	help
+	  This adds support for the Latitude 2100 and similar
+	  notebooks that have an external LED.
+
 comment "LED Triggers"
 
 config LEDS_TRIGGERS
drivers/leds/Makefile +1 -0
index 9e63869..327bfa0 100644
@@ -33,6 +33,7 @@ obj-$(CONFIG_LEDS_REGULATOR)		+= leds-regulator.o
 obj-$(CONFIG_LEDS_INTEL_SS4200)		+= leds-ss4200.o
 obj-$(CONFIG_LEDS_LT3593)		+= leds-lt3593.o
 obj-$(CONFIG_LEDS_ADP5520)		+= leds-adp5520.o
+obj-$(CONFIG_LEDS_DELL_NETBOOKS)	+= dell-led.o
 
 # LED SPI Drivers
 obj-$(CONFIG_LEDS_DAC124S085)		+= leds-dac124s085.o
drivers/leds/dell-led.c new file +200 -0

200 lines not on this page · raw message

Signature · 1 line
1.6.6.1
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Bob Rodgers

This patch adds an LED driver to support the Dell Activity LED on the Dell Latitude 2100 netbook and future products to come. The Activity LED is visible externally in the lid so classroom instructors can observe it from a distance. The driver uses the sysfs led_class and provides a standard LED interface. This driver is ready for submission upstream.

Signed-off by: Bob Rodgers <[email protected]>

Looks good, thank you for making the changes.

Signature · 1 line
Dmitry