All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 RESEND 0/6] KTD2026 indicator LED for X86 Xiaomi Pad2
@ 2024-03-24 15:01 Kate Hsuan
  2024-03-24 15:01 ` [PATCH v5 RESEND 1/6] platform: x86-android-tablets: other: Add swnode for Xiaomi pad2 indicator LED Kate Hsuan
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Kate Hsuan @ 2024-03-24 15:01 UTC (permalink / raw)
  To: Pavel Machek, Lee Jones, linux-leds, platform-driver-x86,
	Hans de Goede, Ilpo Järvinen, André Apitzsch,
	linux-kernel, Andy Shevchenko, Sebastian Reichel, linux-pm
  Cc: Kate Hsuan

This patch added the support for Xiaomi Pad2 indicator LED. This work
included:
1. Added the KTD2026 swnode description to describe the LED controller.
2. Migrated the original driver to fwnode to support x86 platform.
3. Support for multi-color LED trigger event.
4. The LED will be red when charging and the LED will be green when the
   battery is full.

Moreover, the LED trigger is set to the new trigger, called
"bq27520-0-charging-red-full-green" for Xiaomi Pad2 so the LED will be
red when charging and the LED will be green when the battery is full.

The new LED API led_mc_trigger_event() can be found in the following
URL.
https://lore.kernel.org/linux-leds/f40a0b1a-ceac-e269-c2dd-0158c5b4a1ad@gmail.com/T/#t

--
Changes in v5:
1. Fix swnode LED color settings.
2. Improve the driver based on the comments.
3. Introduce a LED new API- led_mc_trigger_event() to make the LED
   color can be changed according to the trigger.
4. Introduced a new trigger "charging-red-full-green". The LED will be
   red when charging and the the LED will be green when the battery is
   full.
5. Set the default trigger to "bq27520-0-charging-red-full-green" for
   Xiaomi Pad2.

Changes in v4:
1. Fix double casting.
2. Since force casting a pointer value to int will trigger a compiler
   warning, the type of num_leds was changed to unsigned long.

Changes in v3:
1. Drop the patch "leds-ktd202x: Skip regulator settings for Xiaomi
   pad2"

Changes in v2:
1. Typo and style fixes.
2. The patch 0003 skips all the regulator setup for Xiaomi pad2 since
   KTD2026 on Xiaomi pad2 is already powered by BP25890RTWR. So, the
   sleep can be removed when removing the module.

Hans de Goede (2):
  leds: core: Add led_mc_set_brightness() function
  leds: trigger: Add led_mc_trigger_event() function

Kate Hsuan (4):
  platform: x86-android-tablets: other: Add swnode for Xiaomi pad2
    indicator LED
  leds: rgb: leds-ktd202x: Get device properties through fwnode to
    support ACPI
  power: supply: power-supply-leds: Add charging_red_full_green trigger
    for RGB LED
  platform: x86-android-tablets: others: Set the LED trigger to
    charging_red_full_green for Xiaomi pad2

 drivers/leds/led-class-multicolor.c           |  1 +
 drivers/leds/led-core.c                       | 31 +++++++
 drivers/leds/led-triggers.c                   | 20 +++++
 drivers/leds/rgb/Kconfig                      |  1 -
 drivers/leds/rgb/leds-ktd202x.c               | 75 ++++++++++-------
 .../platform/x86/x86-android-tablets/other.c  | 82 +++++++++++++++++++
 .../x86/x86-android-tablets/shared-psy-info.h |  2 +
 drivers/power/supply/power_supply_leds.c      | 25 ++++++
 include/linux/leds.h                          | 26 ++++++
 include/linux/power_supply.h                  |  2 +
 10 files changed, 235 insertions(+), 30 deletions(-)

-- 
2.44.0


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

end of thread, other threads:[~2024-04-01  1:40 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24 15:01 [PATCH v5 RESEND 0/6] KTD2026 indicator LED for X86 Xiaomi Pad2 Kate Hsuan
2024-03-24 15:01 ` [PATCH v5 RESEND 1/6] platform: x86-android-tablets: other: Add swnode for Xiaomi pad2 indicator LED Kate Hsuan
2024-03-24 19:29   ` Andy Shevchenko
2024-03-27  7:57     ` Kate Hsuan
2024-03-27 11:05       ` Andy Shevchenko
2024-03-27 11:18         ` Hans de Goede
2024-03-27 11:21           ` Andy Shevchenko
2024-03-28  9:14         ` Kate Hsuan
2024-03-24 15:01 ` [PATCH v5 RESEND 2/6] leds: rgb: leds-ktd202x: Get device properties through fwnode to support ACPI Kate Hsuan
2024-03-24 19:57   ` Andy Shevchenko
2024-03-27  6:53     ` Kate Hsuan
2024-03-27 11:07       ` Andy Shevchenko
2024-03-28  9:16         ` Kate Hsuan
2024-03-24 15:01 ` [PATCH v5 RESEND 3/6] leds: core: Add led_mc_set_brightness() function Kate Hsuan
2024-03-24 20:07   ` Andy Shevchenko
2024-03-24 15:01 ` [PATCH v5 RESEND 4/6] leds: trigger: Add led_mc_trigger_event() function Kate Hsuan
2024-03-24 15:01 ` [PATCH v5 RESEND 5/6] power: supply: power-supply-leds: Add charging_red_full_green trigger for RGB LED Kate Hsuan
2024-03-24 20:10   ` Andy Shevchenko
2024-03-27  6:32     ` Kate Hsuan
2024-03-29 16:23   ` Sebastian Reichel
2024-04-01  1:39     ` Kate Hsuan
2024-03-24 15:01 ` [PATCH v5 RESEND 6/6] platform: x86-android-tablets: others: Set the LED trigger to charging_red_full_green for Xiaomi pad2 Kate Hsuan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.