diff options
author | Magnus Damm <damm@opensource.se> | 2011-10-31 20:11:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-31 20:30:54 -0400 |
commit | f59b6f9f323ff1b4567a69f9063cdd8bb57805e6 (patch) | |
tree | 5f881aa4e699dbed67455422611038a3d86477d3 /drivers/leds/Kconfig | |
parent | 1bff3a2093161d1b982a0958e4eb194bf3c8ce47 (diff) |
leds: Renesas TPU LED driver
Add V2 of the LED driver for a single timer channel for the TPU hardware
block commonly found in Renesas SoCs.
The driver has been written with optimal Power Management in mind, so to
save power the LED is driven as a regular GPIO pin in case of maximum
brightness and power off which allows the TPU hardware to be idle and
which in turn allows the clocks to be stopped and the power domain to be
turned off transparently.
Any other brightness level requires use of the TPU hardware in PWM mode.
TPU hardware device clocks and power are managed through Runtime PM.
System suspend and resume is known to be working - during suspend the LED
is set to off by the generic LED code.
The TPU hardware timer is equipeed with a 16-bit counter together with an
up-to-divide-by-64 prescaler which makes the hardware suitable for
brightness control. Hardware blink is unsupported.
The LED PWM waveform has been verified with a Fluke 123 Scope meter on a
sh7372 Mackerel board. Tested with experimental sh7372 A3SP power domain
patches. Platform device bind/unbind tested ok.
V2 has been tested on the DS2 LED of the sh73a0-based AG5EVM.
[axel.lin@gmail.com: include linux/module.h]
Signed-off-by: Magnus Damm <damm@opensource.se>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/leds/Kconfig')
-rw-r--r-- | drivers/leds/Kconfig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index dc7caaddecf4..ff203a421863 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig | |||
@@ -375,6 +375,18 @@ config LEDS_ASIC3 | |||
375 | cannot be used. This driver supports hardware blinking with an on+off | 375 | cannot be used. This driver supports hardware blinking with an on+off |
376 | period from 62ms to 125s. Say Y to enable LEDs on the HP iPAQ hx4700. | 376 | period from 62ms to 125s. Say Y to enable LEDs on the HP iPAQ hx4700. |
377 | 377 | ||
378 | config LEDS_RENESAS_TPU | ||
379 | bool "LED support for Renesas TPU" | ||
380 | depends on LEDS_CLASS && HAVE_CLK && GENERIC_GPIO | ||
381 | help | ||
382 | This option enables build of the LED TPU platform driver, | ||
383 | suitable to drive any TPU channel on newer Renesas SoCs. | ||
384 | The driver controls the GPIO pin connected to the LED via | ||
385 | the GPIO framework and expects the LED to be connected to | ||
386 | a pin that can be driven in both GPIO mode and using TPU | ||
387 | pin function. The latter to support brightness control. | ||
388 | Brightness control is supported but hardware blinking is not. | ||
389 | |||
378 | config LEDS_TRIGGERS | 390 | config LEDS_TRIGGERS |
379 | bool "LED Trigger support" | 391 | bool "LED Trigger support" |
380 | depends on LEDS_CLASS | 392 | depends on LEDS_CLASS |