DT: Indicator LED max_brightness not correct
Hi everyone,
today I decided to find out why the indicator LED on the pinephone acts so weird in that it is solid on most of the time and then briefly turns off. The activity pattern should be a blinking with a 50% duty cycle.
It turns out that the max_brightness
property of the LEDs is set to 255, where really it should be 1 because since the LEDs are controlled by GPIO they can only differ between two states (on/off). Patch 0105-leds-gpio-make-max_brightness-configurable.patch
already correctly introduced the driver changes needed to read the max-brightness from the DT, but the DT itself hasn't been adapted.
Here's a proposal to make the LEDs work as they should:
--- a/sun50i-a64-pinephone.dtsi
+++ b/sun50i-a64-pinephone.dtsi
@@ -327,6 +327,7 @@
color = <LED_COLOR_ID_BLUE>;
gpios = <&pio 3 20 GPIO_ACTIVE_HIGH>; /* PD20 */
retain-state-suspended;
+ max-brightness = <1>;
};
led-1 {
@@ -334,6 +335,7 @@
color = <LED_COLOR_ID_GREEN>;
gpios = <&pio 3 18 GPIO_ACTIVE_HIGH>; /* PD18 */
retain-state-suspended;
+ max-brightness = <1>;
};
led-2 {
@@ -341,6 +343,7 @@
color = <LED_COLOR_ID_RED>;
gpios = <&pio 3 19 GPIO_ACTIVE_HIGH>; /* PD19 */
retain-state-suspended;
+ max-brightness = <1>;
};
};
I'd send a proper PR but this Gitlab instance won't let me fork the project... :/