Devicetree
 help / color / mirror / Atom feed
* [PATCH V6 0/2] leds: pwm: Add optional GPIO enable pin support
@ 2025-07-07  2:07 LI Qingwu
  2025-07-07  2:07 ` [PATCH V6 1/2] dt-bindings: leds: pwm: add enable-gpios property LI Qingwu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: LI Qingwu @ 2025-07-07  2:07 UTC (permalink / raw)
  To: lee, pavel, robh, krzk+dt, conor+dt, linux-leds, devicetree,
	linux-kernel, Qing-wu.Li
  Cc: bsp-development.geo

Add support for an optional GPIO enable pin to the PWM LED driver.
Some LED controllers require an additional enable GPIO to be enabled
on the device before PWM control can take effect.

Testing:
- Tested on i.MX8MP EVK board with TPS92380 LED backlight driver
- Verified GPIO enable/disable functionality works correctly
- Confirmed both GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW polarities
  work properly


Device tree configuration used for testing:

	backlight_keypad: backlight-keypad {
		compatible = "pwm-leds";

		led {
			color = <LED_COLOR_ID_WHITE>;
			enable-gpios = <&pca6416 11 GPIO_ACTIVE_HIGH>;
			function = LED_FUNCTION_KBD_BACKLIGHT;
			max-brightness = <100>;
			pwms = <&pwm3 0 2500 0>;
		};
	};

Changes in V6:
- Collected Reviewed-by from Krzysztof Kozlowski on 1/2 patch. (Thanks!)

Changes in V5:
- Reword commit message add TPS92380 and LT3743 LED driver chips

Changes in V4:
- Reword commit message to specify the LED driver chip TPS92380
- Add tested device tree configuration to cover letter

Changes in V3:
- fix make dt_binding_check failed on check leds-pwm.yaml

LI Qingwu (2):
  dt-bindings: leds: pwm: add enable-gpios property
  leds: pwm: Add optional GPIO enable pin support

 .../devicetree/bindings/leds/leds-pwm.yaml    |  7 ++++++
 drivers/leds/leds-pwm.c                       | 22 +++++++++++++++++++
 2 files changed, 29 insertions(+)

-- 
2.43.0


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

end of thread, other threads:[~2025-07-07  6:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-07  2:07 [PATCH V6 0/2] leds: pwm: Add optional GPIO enable pin support LI Qingwu
2025-07-07  2:07 ` [PATCH V6 1/2] dt-bindings: leds: pwm: add enable-gpios property LI Qingwu
2025-07-07  2:07 ` [PATCH V6 2/2] leds: pwm: Add optional GPIO enable pin support LI Qingwu
2025-07-07  6:18 ` [PATCH V6 0/2] " Krzysztof Kozlowski

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