diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 02:27:42 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-12 02:27:42 -0500 |
commit | 85b656cf1560e27a89354a23f2c10ba229d2f173 (patch) | |
tree | 53c8b9d30c45dad618a704fd4a5b6aa5b95250cd /include/linux/platform_data | |
parent | 2b684c073f32b557661eba191ce0a584020367e2 (diff) | |
parent | 30dae2f98612d7c8cd855861b9de205ebd9ef4fa (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem changes from Bryan Wu:
"LED subsystem updates for 3.13 are basically cleanup and also add a
new driver for PCA9685"
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
leds: lp55xx: handle enable pin in driver
leds-gpio: of: led should not be created if its status is disabled
of: introduce of_get_available_child_count
leds: Added driver for the NXP PCA9685 I2C chip
leds: pwm: Remove redundant of_match_ptr
leds: Include linux/of.h header
leds: dac124s085: Remove redundant spi_set_drvdata
leds: lp55xx: enable setting default trigger
leds: blinkm: Remove redundant break
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r-- | include/linux/platform_data/leds-lp55xx.h | 7 | ||||
-rw-r--r-- | include/linux/platform_data/leds-pca9685.h | 35 |
2 files changed, 38 insertions, 4 deletions
diff --git a/include/linux/platform_data/leds-lp55xx.h b/include/linux/platform_data/leds-lp55xx.h index 51a2ff579d60..624ff9edad6f 100644 --- a/include/linux/platform_data/leds-lp55xx.h +++ b/include/linux/platform_data/leds-lp55xx.h | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | struct lp55xx_led_config { | 23 | struct lp55xx_led_config { |
24 | const char *name; | 24 | const char *name; |
25 | const char *default_trigger; | ||
25 | u8 chan_nr; | 26 | u8 chan_nr; |
26 | u8 led_current; /* mA x10, 0 if led is not connected */ | 27 | u8 led_current; /* mA x10, 0 if led is not connected */ |
27 | u8 max_current; | 28 | u8 max_current; |
@@ -66,10 +67,8 @@ struct lp55xx_platform_data { | |||
66 | /* Clock configuration */ | 67 | /* Clock configuration */ |
67 | u8 clock_mode; | 68 | u8 clock_mode; |
68 | 69 | ||
69 | /* Platform specific functions */ | 70 | /* optional enable GPIO */ |
70 | int (*setup_resources)(void); | 71 | int enable_gpio; |
71 | void (*release_resources)(void); | ||
72 | void (*enable)(bool state); | ||
73 | 72 | ||
74 | /* Predefined pattern data */ | 73 | /* Predefined pattern data */ |
75 | struct lp55xx_predef_pattern *patterns; | 74 | struct lp55xx_predef_pattern *patterns; |
diff --git a/include/linux/platform_data/leds-pca9685.h b/include/linux/platform_data/leds-pca9685.h new file mode 100644 index 000000000000..778e9e4249cc --- /dev/null +++ b/include/linux/platform_data/leds-pca9685.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * Copyright 2013 Maximilian Güntner <maximilian.guentner@gmail.com> | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of version 2 of | ||
5 | * the GNU General Public License. See the file COPYING in the main | ||
6 | * directory of this archive for more details. | ||
7 | * | ||
8 | * Based on leds-pca963x.h by Peter Meerwald <p.meerwald@bct-electronic.com> | ||
9 | * | ||
10 | * LED driver for the NXP PCA9685 PWM chip | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifndef __LINUX_PCA9685_H | ||
15 | #define __LINUX_PCA9685_H | ||
16 | |||
17 | #include <linux/leds.h> | ||
18 | |||
19 | enum pca9685_outdrv { | ||
20 | PCA9685_OPEN_DRAIN, | ||
21 | PCA9685_TOTEM_POLE, | ||
22 | }; | ||
23 | |||
24 | enum pca9685_inverted { | ||
25 | PCA9685_NOT_INVERTED, | ||
26 | PCA9685_INVERTED, | ||
27 | }; | ||
28 | |||
29 | struct pca9685_platform_data { | ||
30 | struct led_platform_data leds; | ||
31 | enum pca9685_outdrv outdrv; | ||
32 | enum pca9685_inverted inverted; | ||
33 | }; | ||
34 | |||
35 | #endif /* __LINUX_PCA9685_H */ | ||