[PATCH V8 0/2] leds: pwm: Add optional GPIO enable pin support

LI Qingwu posted 2 patches 2 months, 1 week ago
.../devicetree/bindings/leds/leds-pwm.yaml    |  7 +++++++
drivers/leds/leds-pwm.c                       | 20 +++++++++++++++++++
2 files changed, 27 insertions(+)
[PATCH V8 0/2] leds: pwm: Add optional GPIO enable pin support
Posted by LI Qingwu 2 months, 1 week ago
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 V8:
- Format to one line according the review comments from Lee Jones.

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                       | 20 +++++++++++++++++++
 2 files changed, 27 insertions(+)

-- 
2.43.0