Linux LED subsystem development
 help / color / mirror / Atom feed
* [RESEND PATCH 0/3] leds: tps68470: LED driver for TPS68470
@ 2023-02-13 12:45 Kate Hsuan
  2023-02-13 12:45 ` [RESEND PATCH 1/3] platform: x86: int3472: Add MFD cell for tps68470 LED Kate Hsuan
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Kate Hsuan @ 2023-02-13 12:45 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, linux-leds, platform-driver-x86,
	Hans de Goede, Daniel Scally, Mark Gross
  Cc: Kate Hsuan

This work allows user to control the indicator and flash LEDs though
sysfs in user space. TPS68470 is a part of INT3470 and provides GPIO,
LED, and power controls.

To allow the user to control these two LEDs, two masks for the
ILEDCTL, called TPS68470_ILEDCTL_ENA and TPS68470_ILEDCTL_ENA and a two
bits mask, called TPS68470_ILEDCTL_CTRLB are defined and are used to
enable/disable the LEDs and set the power status, respectively.

The LED driver called leds-tps68470 provides the sysfs interface and
the register configuration implementation. For the indicator LED,
only TPS68470_ILEDCTL_ENA needs to be set to turn on/off the LED. For the
flash LED, TPS68470 provides 4 levels of power settings. After enabling
the TPS68470_ILEDCTL_ENB, the power level should also be set.
The strategy is

Brightness  |  Power
=======================
LED_OFF     |   -
LED_ON      |   4mA
LED_HALF    |   8mA
LED_FULL    |   16mA

Moreover, the user and application can set the brightness through sysfs,
/sys/class/leds/tps68470-ileda and /sys/class/leds/tps68470-iledb

Kate Hsuan (3):
  platform: x86: int3472: Add MFD cell for tps68470 LED
  include: mfd: tps68470: Add masks for LEDA and LEDB
  leds: tps68470: Add LED control for tps68470

 drivers/leds/Kconfig                          |  12 ++
 drivers/leds/Makefile                         |   1 +
 drivers/leds/leds-tps68470.c                  | 170 ++++++++++++++++++
 drivers/platform/x86/intel/int3472/tps68470.c |   3 +-
 include/linux/mfd/tps68470.h                  |   5 +
 5 files changed, 190 insertions(+), 1 deletion(-)
 create mode 100644 drivers/leds/leds-tps68470.c

-- 
2.39.0


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

end of thread, other threads:[~2023-03-02  8:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-13 12:45 [RESEND PATCH 0/3] leds: tps68470: LED driver for TPS68470 Kate Hsuan
2023-02-13 12:45 ` [RESEND PATCH 1/3] platform: x86: int3472: Add MFD cell for tps68470 LED Kate Hsuan
2023-02-22 16:33   ` Hans de Goede
2023-02-13 12:45 ` [RESEND PATCH 2/3] include: mfd: tps68470: Add masks for LEDA and LEDB Kate Hsuan
2023-02-22 16:34   ` Hans de Goede
2023-02-24 14:29   ` Dan Scally
2023-02-13 12:45 ` [RESEND PATCH 3/3] leds: tps68470: Add LED control for tps68470 Kate Hsuan
2023-02-22 16:53   ` Hans de Goede
2023-02-24 15:14     ` Dan Scally
2023-03-01 12:37       ` Hans de Goede
2023-03-02  8:36         ` Kate Hsuan

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