From 22e03f3b58dfcca30f0c8de185022132459638d1 Mon Sep 17 00:00:00 2001 From: Raphael Assenat Date: Tue, 27 Feb 2007 19:49:53 +0000 Subject: leds: Add generic GPIO LED driver This patch adds support for GPIO connected leds via the new GPIO framework. Information about leds (gpio, polarity, name, default trigger) is passed to the driver via platform_data. Signed-off-by: Raphael Assenat Signed-off-by: Richard Purdie --- include/linux/leds.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'include/linux/leds.h') diff --git a/include/linux/leds.h b/include/linux/leds.h index 88afceffb7c..059abfe219d 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -110,4 +110,18 @@ extern void ledtrig_ide_activity(void); #define ledtrig_ide_activity() do {} while(0) #endif +/* For the leds-gpio driver */ +struct gpio_led { + const char *name; + char *default_trigger; + unsigned gpio; + u8 active_low; +}; + +struct gpio_led_platform_data { + int num_leds; + struct gpio_led *leds; +}; + + #endif /* __LINUX_LEDS_H_INCLUDED */ -- cgit v1.2.3 From f8a7c6fe14f556ca8eeddce258cb21392d0c3a2f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 8 Jul 2007 23:19:31 +0100 Subject: leds: Convert from struct class_device to struct device Convert the LEDs class from struct class_device to struct device since class_device is scheduled for removal. Signed-off-by: Richard Purdie Acked-by: Greg Kroah-Hartman --- include/linux/leds.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/linux/leds.h') diff --git a/include/linux/leds.h b/include/linux/leds.h index 059abfe219d..dc1178f6184 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h @@ -16,7 +16,6 @@ #include struct device; -struct class_device; /* * LED Core */ @@ -38,7 +37,7 @@ struct led_classdev { void (*brightness_set)(struct led_classdev *led_cdev, enum led_brightness brightness); - struct class_device *class_dev; + struct device *dev; struct list_head node; /* LED Device list */ char *default_trigger; /* Trigger to use */ -- cgit v1.2.3