Re: [PATCH v3 2/3] leds: pwm: add support for default-state device property

Denis Osterland-Heim
2020-06-08T06:39:31Z

Hi Jacek,

is your ack still valid for the new versions of the patch-set?
Due to the changes I made, I am not sure.

Regards, Denis

Am Dienstag, den 17.03.2020, 21:43 +0100 schrieb Jacek Anaszewski:
> Hi Denis,
>
> On 3/16/20 9:24 PM, Denis Osterland-Heim wrote:
> > Hi Jacek,
> >
> > Am Montag, den 16.03.2020, 19:36 +0100 schrieb Jacek Anaszewski:
> > > Hi Denis,
> > >
> > > On 3/16/20 1:53 PM, Denis Osterland-Heim wrote:
> >
> > ...
> > > >
> > > > @@ -92,13 +96,27 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
> > > >
> > > > pwm_init_state(led_data->pwm, &led_data->pwmstate);
> > > >
> > > > + if (led->default_state == LEDS_PWM_DEFSTATE_ON)
> > > > + led_data->cdev.brightness = led->max_brightness;
> > > > + else if (led->default_state == LEDS_PWM_DEFSTATE_KEEP) {
> > > > + uint64_t brightness;
> > > > +
> > > > + pwm_get_state(led_data->pwm, &led_data->pwmstate);
> > >
> > > This seems to not be reading the device state, i.e. what you tried
> > > to address by direct call to pwm->chip->ops->get_state() before.
> > >
> > > Am I missing something?
> > >
> >
> > well, not you, but I missed cfc4c189bc70b1acc17e6f1abf1dc1c0ae890bd8.
> > Since this commit pwm_get_state() is sufficient.
>
> I assume you tested it?
>
> With that, for the whole set:
>
> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>