diff options
| author | Mark A. Greer <mgreer@animalcreek.com> | 2013-07-25 13:16:41 -0400 |
|---|---|---|
| committer | Bryan Wu <cooloney@gmail.com> | 2013-08-26 20:22:10 -0400 |
| commit | 8465b01827b7a1e0e2464b0a300618bf7add25d8 (patch) | |
| tree | a06c6620291ab5a0a8e9eb7e5507e9d089ba7139 /include/linux/platform_data | |
| parent | 33b3a561f417ec3e1013999ce8bdb6c055abb1ce (diff) | |
leds: pca9633: Add hardware blink support
Add hardware blinking support to the pca9633 driver.
NOTE: Hardware blinking violates the leds infrastructure
driver interface since the hardware only supports
blinking all LEDs with the same delay_on/delay_off
rates. That is, only the LEDs that are set to blink
will actually blink but all LEDs that are set to blink
will blink in identical fashion. The delay_on/delay_off
values of the last LED that is set to blink will be used
for all of the blinking LEDs. If the hardware doesn't
support the requested blinking pattern, a default of
500ms on and off will be used.
Hardware blinking is disabled by default but can be enabled
by setting the 'blink_type' member in the platform_data
struct to 'PCA9633_HW_BLINK' or by adding the 'nxp,hw-blink'
property to the DTS.
(fengguang.wu@intel.com: Removes unneeded semicolon.)
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/leds-pca9633.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/platform_data/leds-pca9633.h b/include/linux/platform_data/leds-pca9633.h index c5bf29b6fa7f..3c1037a81d34 100644 --- a/include/linux/platform_data/leds-pca9633.h +++ b/include/linux/platform_data/leds-pca9633.h | |||
| @@ -27,9 +27,15 @@ enum pca9633_outdrv { | |||
| 27 | PCA9633_TOTEM_POLE, /* aka push-pull */ | 27 | PCA9633_TOTEM_POLE, /* aka push-pull */ |
| 28 | }; | 28 | }; |
| 29 | 29 | ||
| 30 | enum pca9633_blink_type { | ||
| 31 | PCA9633_SW_BLINK, | ||
| 32 | PCA9633_HW_BLINK, | ||
| 33 | }; | ||
| 34 | |||
| 30 | struct pca9633_platform_data { | 35 | struct pca9633_platform_data { |
| 31 | struct led_platform_data leds; | 36 | struct led_platform_data leds; |
| 32 | enum pca9633_outdrv outdrv; | 37 | enum pca9633_outdrv outdrv; |
| 38 | enum pca9633_blink_type blink_type; | ||
| 33 | }; | 39 | }; |
| 34 | 40 | ||
| 35 | #endif /* __LINUX_PCA9633_H*/ | 41 | #endif /* __LINUX_PCA9633_H*/ |
