From f59b6f9f323ff1b4567a69f9063cdd8bb57805e6 Mon Sep 17 00:00:00 2001 From: Magnus Damm Date: Mon, 31 Oct 2011 17:11:55 -0700 Subject: 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 Cc: Paul Mundt Cc: Richard Purdie Cc: Grant Likely Signed-off-by: Axel Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/leds/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/leds/Makefile') diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile index a0a1b89d78a8..e4f6bf568880 100644 --- a/drivers/leds/Makefile +++ b/drivers/leds/Makefile @@ -42,6 +42,7 @@ obj-$(CONFIG_LEDS_MC13783) += leds-mc13783.o obj-$(CONFIG_LEDS_NS2) += leds-ns2.o obj-$(CONFIG_LEDS_NETXBIG) += leds-netxbig.o obj-$(CONFIG_LEDS_ASIC3) += leds-asic3.o +obj-$(CONFIG_LEDS_RENESAS_TPU) += leds-renesas-tpu.o # LED SPI Drivers obj-$(CONFIG_LEDS_DAC124S085) += leds-dac124s085.o -- cgit v1.2.1