Re: [PATCH v2] leds: pwm: add support for default-state device property

From: Denis Osterland-Heim
Date: Thu Mar 12 2020 - 03:35:20 EST


Hi Pavel,

Am Mittwoch, den 11.03.2020, 22:33 +0100 schrieb Pavel Machek:
> Hi!
>
> > This patch adds support for "default-state" devicetree property, which
> > allows to defer pwm init to first use of led.
> >
> > This allows to configure the PWM early in bootloader to let the LED
> > blink until an application in Linux userspace set something different.
>
> "sets".
done

>
> > Signed-off-by: Denis Osterland-Heim <Denis.Osterland@xxxxxxxxx>
>
> Looks good, I'll probably just apply it.
I will rebase on your next branch, so that it uses atomic PWM API, soon.

>
> > index 6c6583c35f2f..d0f489680594 100644
> > --- a/Documentation/devicetree/bindings/leds/leds-pwm.txt
> > +++ b/Documentation/devicetree/bindings/leds/leds-pwm.txt
> > @@ -19,6 +19,8 @@ LED sub-node properties:
> > see Documentation/devicetree/bindings/leds/common.txt
> > - linux,default-trigger : (optional)
> > see Documentation/devicetree/bindings/leds/common.txt
> > +- default-state : (optional)
> > + see Documentation/devicetree/bindings/leds/common.yaml
> >
>
> Should other references be updated to common.yaml (as a separate patch)?
well, the whole txt file should be converted to yaml...
currently common.txt exists and points to common.yaml, so no urgent need

>
> > diff --git a/include/linux/leds_pwm.h b/include/linux/leds_pwm.h
> > index 93d101d28943..c9ef9012913d 100644
> > --- a/include/linux/leds_pwm.h
> > +++ b/include/linux/leds_pwm.h
> > @@ -10,6 +10,7 @@ struct led_pwm {
> > const char *default_trigger;
> > unsigned pwm_id __deprecated;
> > u8 active_low;
> > + u8 default_state;
> > unsigned max_brightness;
> > unsigned pwm_period_ns;
> > };
>
> leds-pwm.c but leds_pwm.h. Hmm. This really should be leds-pwm.h.
>
> Actually, leds-pwm.c is only user of leds_pwm.h, so that one should
> just disappear...
I can move it in a second patch, if you want

Regards Denis
>
> Best regards,
> Pavel
>
> +----------------------------------------------------------------------+
> > Z1 SecureMail Gateway Processing Info |
>
> +----------------------------------------------------------------------+
> > - The message was signed by |
> > [No Info available] |
> > Signature not verifiable |
> > - Message content not verifiable |
> > - Certificate not verifiable |
>
> +----------------------------------------------------------------------+


Diehl Connectivity Solutions GmbH
GeschÃftsfÃhrung: Horst Leonberger
Sitz der Gesellschaft: NÃrnberg - Registergericht: Amtsgericht
NÃrnberg: HRB 32315
___________________________________________________________________________________________________

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung und/oder Publikation dieser E-Mail ist strengstens untersagt.
- Informationen zum Datenschutz, insbesondere zu Ihren Rechten, erhalten Sie unter https://www.diehl.com/group/de/transparenz-und-informationspflichten/

The contents of the above mentioned e-mail is not legally binding. This e-mail contains confidential and/or legally protected information. Please inform us if you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, disclosure, alteration, distribution and/or publication of this e-mail is strictly prohibited.
- For general information on data protection and your respective rights please visit https://www.diehl.com/group/en/transparency-and-information-obligations/