git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
[safe/jmp/linux-2.6]
/
include
/
linux
/
leds.h
diff --git
a/include/linux/leds.h
b/include/linux/leds.h
index
059abfe
..
24489da
100644
(file)
--- a/
include/linux/leds.h
+++ b/
include/linux/leds.h
@@
-14,9
+14,9
@@
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/list.h>
#include <linux/spinlock.h>
+#include <linux/rwsem.h>
struct device;
struct device;
-struct class_device;
/*
* LED Core
*/
/*
* LED Core
*/
@@
-32,19
+32,30
@@
struct led_classdev {
int brightness;
int flags;
int brightness;
int flags;
+ /* Lower 16 bits reflect status */
#define LED_SUSPENDED (1 << 0)
#define LED_SUSPENDED (1 << 0)
+ /* Upper 16 bits reflect control information */
+#define LED_CORE_SUSPENDRESUME (1 << 16)
/* Set LED brightness level */
/* Set LED brightness level */
+ /* Must not sleep, use a workqueue if needed */
void (*brightness_set)(struct led_classdev *led_cdev,
enum led_brightness brightness);
void (*brightness_set)(struct led_classdev *led_cdev,
enum led_brightness brightness);
+ /* Get LED brightness level */
+ enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
- struct class_device *class_dev;
+ /* Activate hardware accelerated blink */
+ int (*blink_set)(struct led_classdev *led_cdev,
+ unsigned long *delay_on,
+ unsigned long *delay_off);
+
+ struct device *dev;
struct list_head node; /* LED Device list */
struct list_head node; /* LED Device list */
- c
har
*default_trigger; /* Trigger to use */
+ c
onst char
*default_trigger; /* Trigger to use */
#ifdef CONFIG_LEDS_TRIGGERS
/* Protects the trigger data below */
#ifdef CONFIG_LEDS_TRIGGERS
/* Protects the trigger data below */
-
rwlock_t
trigger_lock;
+
struct rw_semaphore
trigger_lock;
struct led_trigger *trigger;
struct list_head trig_list;
struct led_trigger *trigger;
struct list_head trig_list;
@@
-110,10
+121,24
@@
extern void ledtrig_ide_activity(void);
#define ledtrig_ide_activity() do {} while(0)
#endif
#define ledtrig_ide_activity() do {} while(0)
#endif
+/*
+ * Generic LED platform data for describing LED names and default triggers.
+ */
+struct led_info {
+ const char *name;
+ const char *default_trigger;
+ int flags;
+};
+
+struct led_platform_data {
+ int num_leds;
+ struct led_info *leds;
+};
+
/* For the leds-gpio driver */
struct gpio_led {
const char *name;
/* For the leds-gpio driver */
struct gpio_led {
const char *name;
- char *default_trigger;
+ c
onst c
har *default_trigger;
unsigned gpio;
u8 active_low;
};
unsigned gpio;
u8 active_low;
};
@@
-121,6
+146,9
@@
struct gpio_led {
struct gpio_led_platform_data {
int num_leds;
struct gpio_led *leds;
struct gpio_led_platform_data {
int num_leds;
struct gpio_led *leds;
+ int (*gpio_blink_set)(unsigned gpio,
+ unsigned long *delay_on,
+ unsigned long *delay_off);
};
};