diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/leds-lp3944.h | 3 | ||||
| -rw-r--r-- | include/linux/leds-pca9532.h | 2 | ||||
| -rw-r--r-- | include/linux/leds-regulator.h | 46 |
3 files changed, 47 insertions, 4 deletions
diff --git a/include/linux/leds-lp3944.h b/include/linux/leds-lp3944.h index afc9f9fd70f5..2618aa9063bc 100644 --- a/include/linux/leds-lp3944.h +++ b/include/linux/leds-lp3944.h | |||
| @@ -12,9 +12,6 @@ | |||
| 12 | #ifndef __LINUX_LEDS_LP3944_H | 12 | #ifndef __LINUX_LEDS_LP3944_H |
| 13 | #define __LINUX_LEDS_LP3944_H | 13 | #define __LINUX_LEDS_LP3944_H |
| 14 | 14 | ||
| 15 | #include <linux/leds.h> | ||
| 16 | #include <linux/workqueue.h> | ||
| 17 | |||
| 18 | #define LP3944_LED0 0 | 15 | #define LP3944_LED0 0 |
| 19 | #define LP3944_LED1 1 | 16 | #define LP3944_LED1 1 |
| 20 | #define LP3944_LED2 2 | 17 | #define LP3944_LED2 2 |
diff --git a/include/linux/leds-pca9532.h b/include/linux/leds-pca9532.h index 96eea90f01a8..f158eb1149aa 100644 --- a/include/linux/leds-pca9532.h +++ b/include/linux/leds-pca9532.h | |||
| @@ -32,7 +32,7 @@ struct pca9532_led { | |||
| 32 | struct i2c_client *client; | 32 | struct i2c_client *client; |
| 33 | char *name; | 33 | char *name; |
| 34 | struct led_classdev ldev; | 34 | struct led_classdev ldev; |
| 35 | struct work_struct work; | 35 | struct work_struct work; |
| 36 | enum pca9532_type type; | 36 | enum pca9532_type type; |
| 37 | enum pca9532_state state; | 37 | enum pca9532_state state; |
| 38 | }; | 38 | }; |
diff --git a/include/linux/leds-regulator.h b/include/linux/leds-regulator.h new file mode 100644 index 000000000000..5a8eb389aab8 --- /dev/null +++ b/include/linux/leds-regulator.h | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* | ||
| 2 | * leds-regulator.h - platform data structure for regulator driven LEDs. | ||
| 3 | * | ||
| 4 | * Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it> | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | * | ||
| 10 | */ | ||
| 11 | |||
| 12 | #ifndef __LINUX_LEDS_REGULATOR_H | ||
| 13 | #define __LINUX_LEDS_REGULATOR_H | ||
| 14 | |||
| 15 | /* | ||
| 16 | * Use "vled" as supply id when declaring the regulator consumer: | ||
| 17 | * | ||
| 18 | * static struct regulator_consumer_supply pcap_regulator_VVIB_consumers [] = { | ||
| 19 | * { .dev_name = "leds-regulator.0", supply = "vled" }, | ||
| 20 | * }; | ||
| 21 | * | ||
| 22 | * If you have several regulator driven LEDs, you can append a numerical id to | ||
| 23 | * .dev_name as done above, and use the same id when declaring the platform | ||
| 24 | * device: | ||
| 25 | * | ||
| 26 | * static struct led_regulator_platform_data a780_vibrator_data = { | ||
| 27 | * .name = "a780::vibrator", | ||
| 28 | * }; | ||
| 29 | * | ||
| 30 | * static struct platform_device a780_vibrator = { | ||
| 31 | * .name = "leds-regulator", | ||
| 32 | * .id = 0, | ||
| 33 | * .dev = { | ||
| 34 | * .platform_data = &a780_vibrator_data, | ||
| 35 | * }, | ||
| 36 | * }; | ||
| 37 | */ | ||
| 38 | |||
| 39 | #include <linux/leds.h> | ||
| 40 | |||
| 41 | struct led_regulator_platform_data { | ||
| 42 | char *name; /* LED name as expected by LED class */ | ||
| 43 | enum led_brightness brightness; /* initial brightness value */ | ||
| 44 | }; | ||
| 45 | |||
| 46 | #endif /* __LINUX_LEDS_REGULATOR_H */ | ||
