2021-02-04 15:01:40

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

On Thu 2021-02-04 14:37:38, Sven Schuchmann wrote:
> In order to use a multicolor-led together with a trigger
> the led needs to have an intensity set to see something.
> The trigger changes the brightness of the led but if there
> is no intensity we actually see nothing.
>
> This patch adds the ability to set the default intensity
> of each multi-led node so that it is turned on from DT.
> If no intensity is given the led will be initialized
> with full intensity.



> diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
> index f13117eed976..4b40bf66483c 100644
> --- a/drivers/leds/leds-lp50xx.c
> +++ b/drivers/leds/leds-lp50xx.c
> @@ -267,7 +267,6 @@ struct lp50xx_led {
> struct led_classdev_mc mc_cdev;
> struct lp50xx *priv;
> unsigned long bank_modules;
> - int led_intensity[LP50XX_LEDS_PER_MODULE];
> u8 ctrl_bank_enabled;
> int led_number;
> };

? Does not make sense and changelog does not help.
Pavel

--
http://www.livejournal.com/~pavelmachek


Attachments:
(No filename) (1.01 kB)
signature.asc (201.00 B)
Download all attachments

2021-02-05 10:07:17

by Sven Schuchmann

[permalink] [raw]
Subject: AW: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

Hello Pavel,

> > diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
> > index f13117eed976..4b40bf66483c 100644
> > --- a/drivers/leds/leds-lp50xx.c
> > +++ b/drivers/leds/leds-lp50xx.c
> > @@ -267,7 +267,6 @@ struct lp50xx_led {
> > struct led_classdev_mc mc_cdev;
> > struct lp50xx *priv;
> > unsigned long bank_modules;
> > - int led_intensity[LP50XX_LEDS_PER_MODULE];
> > u8 ctrl_bank_enabled;
> > int led_number;
> > };
>
> ? Does not make sense and changelog does not help.

This is an unused variable which is in the driver
(same as the regulator). Should I provide a patch on its own for that
or just describe in the changelog?

Best Regards,

Sven

2021-02-05 10:39:55

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

On Fri 2021-02-05 09:59:19, Sven Schuchmann wrote:
> Hello Pavel,
>
> > > diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
> > > index f13117eed976..4b40bf66483c 100644
> > > --- a/drivers/leds/leds-lp50xx.c
> > > +++ b/drivers/leds/leds-lp50xx.c
> > > @@ -267,7 +267,6 @@ struct lp50xx_led {
> > > struct led_classdev_mc mc_cdev;
> > > struct lp50xx *priv;
> > > unsigned long bank_modules;
> > > - int led_intensity[LP50XX_LEDS_PER_MODULE];
> > > u8 ctrl_bank_enabled;
> > > int led_number;
> > > };
> >
> > ? Does not make sense and changelog does not help.
>
> This is an unused variable which is in the driver
> (same as the regulator). Should I provide a patch on its own for that
> or just describe in the changelog?

Lets do separate patch here. DT changes will need Ack from Rob, this
can go in directly.

Can you or Dan submit patch getting the regulator support to work? If
not, I guess we should remove the regulator support after all.

Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek


Attachments:
(No filename) (1.06 kB)
signature.asc (188.00 B)
Digital signature
Download all attachments

2021-02-05 11:39:45

by Sven Schuchmann

[permalink] [raw]
Subject: AW: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

Hello Pavel,


> > > > diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
> > > > index f13117eed976..4b40bf66483c 100644
> > > > --- a/drivers/leds/leds-lp50xx.c
> > > > +++ b/drivers/leds/leds-lp50xx.c
> > > > @@ -267,7 +267,6 @@ struct lp50xx_led {
> > > > struct led_classdev_mc mc_cdev;
> > > > struct lp50xx *priv;
> > > > unsigned long bank_modules;
> > > > - int led_intensity[LP50XX_LEDS_PER_MODULE];
> > > > u8 ctrl_bank_enabled;
> > > > int led_number;
> > > > };
> > >
> > > ? Does not make sense and changelog does not help.
> >
> > This is an unused variable which is in the driver
> > (same as the regulator). Should I provide a patch on its own for that
> > or just describe in the changelog?
>
> Lets do separate patch here. DT changes will need Ack from Rob, this
> can go in directly.

Okay, I will submit a separate patch

> Can you or Dan submit patch getting the regulator support to work? If
> not, I guess we should remove the regulator support after all.

To be true I am fairly new to the kernel and have no idea
how to test this. So no, I don't want provide a patch (except
for removing), sorry.

Best Regards,

Sven

2021-02-19 11:19:25

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

Hi!

> > > > ? Does not make sense and changelog does not help.
> > >
> > > This is an unused variable which is in the driver
> > > (same as the regulator). Should I provide a patch on its own for that
> > > or just describe in the changelog?
> >
> > Lets do separate patch here. DT changes will need Ack from Rob, this
> > can go in directly.
>
> Okay, I will submit a separate patch
>
> > Can you or Dan submit patch getting the regulator support to work? If
> > not, I guess we should remove the regulator support after all.
>
> To be true I am fairly new to the kernel and have no idea
> how to test this. So no, I don't want provide a patch (except
> for removing), sorry.

No problem. It seems Andy submitted series for this.

Best regards,
Pavel

--
http://www.livejournal.com/~pavelmachek


Attachments:
(No filename) (837.00 B)
signature.asc (201.00 B)
Download all attachments

2021-02-19 11:40:27

by Sven Schuchmann

[permalink] [raw]
Subject: AW: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

Hello Pavel, hello Andy,

> -----Urspr?ngliche Nachricht-----
> Von: Pavel Machek <[email protected]>
> Gesendet: Freitag, 19. Februar 2021 12:17
> An: Sven Schuchmann <[email protected]>
> Cc: Dan Murphy <[email protected]>; [email protected]; [email protected]
> Betreff: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT
>
> > > Can you or Dan submit patch getting the regulator support to work? If
> > > not, I guess we should remove the regulator support after all.
> >
> > To be true I am fairly new to the kernel and have no idea
> > how to test this. So no, I don't want provide a patch (except
> > for removing), sorry.
>
> No problem. It seems Andy submitted series for this.
>

To me it seems that patches from Andy don't make
the regulator work. Maybe I am wrong?

I am very busy right now but hopefully I will find some more
time next week to submit some new patches. On my list so far
for the lp50xx:
* Remove unused variable https://www.spinics.net/lists/linux-leds/msg17654.html
* Enable-GPIO not working (used before init, reset/enable order wrong)
* Add default setting from DT https://www.spinics.net/lists/linux-leds/msg17596.html
* Fix regulator https://www.spinics.net/lists/linux-leds/msg17631.html

Best Regards,

Sven

2021-02-19 13:58:21

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

On Fri, Feb 19, 2021 at 11:38:09AM +0000, Sven Schuchmann wrote:
> Hello Pavel, hello Andy,
>
> > -----Urspr?ngliche Nachricht-----
> > Von: Pavel Machek <[email protected]>
> > Gesendet: Freitag, 19. Februar 2021 12:17
> > An: Sven Schuchmann <[email protected]>
> > Cc: Dan Murphy <[email protected]>; [email protected]; [email protected]
> > Betreff: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT
> >
> > > > Can you or Dan submit patch getting the regulator support to work? If
> > > > not, I guess we should remove the regulator support after all.
> > >
> > > To be true I am fairly new to the kernel and have no idea
> > > how to test this. So no, I don't want provide a patch (except
> > > for removing), sorry.
> >
> > No problem. It seems Andy submitted series for this.
> >
>
> To me it seems that patches from Andy don't make
> the regulator work. Maybe I am wrong?

I;m not sure I understand this correctly. Do you mean that my patches broke
something? Which one explicitly and what is broken?

> I am very busy right now but hopefully I will find some more
> time next week to submit some new patches. On my list so far
> for the lp50xx:
> * Remove unused variable https://www.spinics.net/lists/linux-leds/msg17654.html
> * Enable-GPIO not working (used before init, reset/enable order wrong)
> * Add default setting from DT https://www.spinics.net/lists/linux-leds/msg17596.html
> * Fix regulator https://www.spinics.net/lists/linux-leds/msg17631.html

--
With Best Regards,
Andy Shevchenko


2021-02-19 14:11:49

by Sven Schuchmann

[permalink] [raw]
Subject: AW: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

Hello Andy,

> Von: Andy Shevchenko <[email protected]>
> Gesendet: Freitag, 19. Februar 2021 14:56
> An: Sven Schuchmann <[email protected]>
> Cc: Pavel Machek <[email protected]>; Dan Murphy <[email protected]>; [email protected];
> [email protected]
> Betreff: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT
>
> > > > > Can you or Dan submit patch getting the regulator support to work? If
> > > > > not, I guess we should remove the regulator support after all.
> > > >
> > > > To be true I am fairly new to the kernel and have no idea
> > > > how to test this. So no, I don't want provide a patch (except
> > > > for removing), sorry.
> > >
> > > No problem. It seems Andy submitted series for this.
> > >
> >
> > To me it seems that patches from Andy don't make
> > the regulator work. Maybe I am wrong?
>
> I;m not sure I understand this correctly. Do you mean that my patches broke
> something? Which one explicitly and what is broken?

No, your patches do not break something (as far as I can see).
Pavel asked for a patch to fix the regulator. The regulator
at this time is only initialized but never used in the lp50xx.
I told him (see above) that I cannot provide a patch which
fixes this. He answered that you fixed this in your series,
but to me it doesn't seem so.
or did you fix the regulator usage in your patch series?

Best Regards,

Sven

2021-02-19 14:23:15

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

On Fri, Feb 19, 2021 at 1:19 PM Pavel Machek <[email protected]> wrote:
> > > > > ? Does not make sense and changelog does not help.
> > > >
> > > > This is an unused variable which is in the driver
> > > > (same as the regulator). Should I provide a patch on its own for that
> > > > or just describe in the changelog?
> > >
> > > Lets do separate patch here. DT changes will need Ack from Rob, this
> > > can go in directly.
> >
> > Okay, I will submit a separate patch
> >
> > > Can you or Dan submit patch getting the regulator support to work? If
> > > not, I guess we should remove the regulator support after all.
> >
> > To be true I am fairly new to the kernel and have no idea
> > how to test this. So no, I don't want provide a patch (except
> > for removing), sorry.
>
> No problem. It seems Andy submitted series for this.

Ah, now I understand what you, Sven, meant.
I didn't touch regulator code, so it left the same, but making it work
probably needs just enabling during ->probe().

--
With Best Regards,
Andy Shevchenko

2021-02-19 14:53:51

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

On Fri, Feb 19, 2021 at 02:09:03PM +0000, Sven Schuchmann wrote:
> > Von: Andy Shevchenko <[email protected]>
> > Gesendet: Freitag, 19. Februar 2021 14:56

> > > > > > Can you or Dan submit patch getting the regulator support to work? If
> > > > > > not, I guess we should remove the regulator support after all.
> > > > >
> > > > > To be true I am fairly new to the kernel and have no idea
> > > > > how to test this. So no, I don't want provide a patch (except
> > > > > for removing), sorry.
> > > >
> > > > No problem. It seems Andy submitted series for this.
> > > >
> > >
> > > To me it seems that patches from Andy don't make
> > > the regulator work. Maybe I am wrong?
> >
> > I;m not sure I understand this correctly. Do you mean that my patches broke
> > something? Which one explicitly and what is broken?
>
> No, your patches do not break something (as far as I can see).
> Pavel asked for a patch to fix the regulator. The regulator
> at this time is only initialized but never used in the lp50xx.
> I told him (see above) that I cannot provide a patch which
> fixes this. He answered that you fixed this in your series,
> but to me it doesn't seem so.
> or did you fix the regulator usage in your patch series?

No, I haven't touched regulator and I see now what is there.
One may add some code, I know Linus did it in many places, maybe he can help to
have done this properly?


--
With Best Regards,
Andy Shevchenko


2021-02-19 18:11:25

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH v2 2/4] leds: lp50xx: add setting of default intensity from DT

On Fri 2021-02-19 16:18:38, Andy Shevchenko wrote:
> On Fri, Feb 19, 2021 at 1:19 PM Pavel Machek <[email protected]> wrote:
> > > > > > ? Does not make sense and changelog does not help.
> > > > >
> > > > > This is an unused variable which is in the driver
> > > > > (same as the regulator). Should I provide a patch on its own for that
> > > > > or just describe in the changelog?
> > > >
> > > > Lets do separate patch here. DT changes will need Ack from Rob, this
> > > > can go in directly.
> > >
> > > Okay, I will submit a separate patch
> > >
> > > > Can you or Dan submit patch getting the regulator support to work? If
> > > > not, I guess we should remove the regulator support after all.
> > >
> > > To be true I am fairly new to the kernel and have no idea
> > > how to test this. So no, I don't want provide a patch (except
> > > for removing), sorry.
> >
> > No problem. It seems Andy submitted series for this.
>
> Ah, now I understand what you, Sven, meant.
> I didn't touch regulator code, so it left the same, but making it work
> probably needs just enabling during ->probe().

Yep, sorry, I was confused.

Anyway, I'd rather seen patch fixing the regulator code than removing
it completely.

Best regards,
Pavel
--
http://www.livejournal.com/~pavelmachek


Attachments:
(No filename) (1.29 kB)
signature.asc (201.00 B)
Download all attachments