public inbox for linux-leds@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] pwm: TLC591xx PWM driver
@ 2015-08-18 13:52 Tomi Valkeinen
  2015-08-18 13:52 ` [RFC PATCH] pwm: add TLC59108/TLC59116 " Tomi Valkeinen
  2015-08-18 15:09 ` [RFC PATCH] pwm: TLC591xx " Andrew Lunn
  0 siblings, 2 replies; 9+ messages in thread
From: Tomi Valkeinen @ 2015-08-18 13:52 UTC (permalink / raw)
  To: linux-pwm, Thierry Reding, Andrew Lunn, linux-leds,
	Jacek Anaszewski
  Cc: Bryan Wu, Tomi Valkeinen

Hi,

Here's an RFC for a driver for TI's TLC59108/TLC59116 chips. This is an
alternate implementation to the LED driver [1].

We (TI) use the chip for LCD backlight and also as a GPIO expander. Andrew
(author of the LED driver) uses it for plain LEDs.

This implementation works for backlight and plain LED use cases. The LED
version does not (afaik) work for backlight out of the box. Neither supports
GPIO API.

I'd like to hear feedback on whether this kind of HW should have a PWM or a LED
driver.

The LED driver offers APIs for things like blinking, which the PWM API doesn't.
On the other hand, there's pwm_bl.c which give us backlight device with PWM,
and a GPIO over PWM sounds more sane to me than GPIO over LED. But I really
don't have any hard arguments why one solution would be better than the other.

Of course, one option is to have both PWM and LED drivers in the kernel. This
is the reason I set the driver's compatible string to "tlc59108-pwm" so that it
doesn't clash with the LED driver.

Or, possibly a mfd is an option.

 Tomi

[1] https://www.marc.info/?l=devicetree&m=142663032707961&w=1

Tomi Valkeinen (1):
  pwm: add TLC59108/TLC59116 PWM driver

 .../devicetree/bindings/pwm/ti,tlc59108-pwm.txt    |  16 ++
 drivers/pwm/Kconfig                                |  10 +
 drivers/pwm/Makefile                               |   1 +
 drivers/pwm/pwm-tlc591xx.c                         | 273 +++++++++++++++++++++
 4 files changed, 300 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/ti,tlc59108-pwm.txt
 create mode 100644 drivers/pwm/pwm-tlc591xx.c

-- 
2.1.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-08-19 13:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18 13:52 [RFC PATCH] pwm: TLC591xx PWM driver Tomi Valkeinen
2015-08-18 13:52 ` [RFC PATCH] pwm: add TLC59108/TLC59116 " Tomi Valkeinen
2015-08-18 14:19   ` Andrew Lunn
2015-08-18 14:58     ` Tomi Valkeinen
2015-08-18 15:14       ` Andrew Lunn
2015-08-18 15:09 ` [RFC PATCH] pwm: TLC591xx " Andrew Lunn
2015-08-19 10:24   ` Thierry Reding
2015-08-19 10:52   ` Tomi Valkeinen
2015-08-19 13:31     ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox