2020-08-09 18:56:07

by Alex Dewar

[permalink] [raw]
Subject: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

This battery appears only to be used by a single board (DA850), so it
makes sense to add this to the Kconfig file so that users don't build
the module unnecessarily. It currently seems to be built for the x86
Arch Linux kernel where it's probably not doing much good.

Signed-off-by: Alex Dewar <[email protected]>
---
drivers/power/supply/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
index faf2830aa1527..9f76e2f47ac6d 100644
--- a/drivers/power/supply/Kconfig
+++ b/drivers/power/supply/Kconfig
@@ -164,7 +164,7 @@ config BATTERY_DS2782

config BATTERY_LEGO_EV3
tristate "LEGO MINDSTORMS EV3 battery"
- depends on OF && IIO && GPIOLIB
+ depends on OF && IIO && GPIOLIB && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
help
Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.

--
2.28.0


2020-08-11 14:27:34

by David Lechner

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On 8/9/20 1:54 PM, Alex Dewar wrote:
> This battery appears only to be used by a single board (DA850), so it
> makes sense to add this to the Kconfig file so that users don't build
> the module unnecessarily. It currently seems to be built for the x86
> Arch Linux kernel where it's probably not doing much good.

It would probably also make sense to add "default n" since it only
applies to one board in the entire arch.

BATTERY_LEGO_EV3 is already explicitly set to "m" in the appropriate
defconfig file, so I don't think it would break anything.

>
> Signed-off-by: Alex Dewar <[email protected]>
> ---
> drivers/power/supply/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> index faf2830aa1527..9f76e2f47ac6d 100644
> --- a/drivers/power/supply/Kconfig
> +++ b/drivers/power/supply/Kconfig
> @@ -164,7 +164,7 @@ config BATTERY_DS2782
>
> config BATTERY_LEGO_EV3
> tristate "LEGO MINDSTORMS EV3 battery"
> - depends on OF && IIO && GPIOLIB
> + depends on OF && IIO && GPIOLIB && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> help
> Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.
>
>

2020-08-12 13:38:36

by Alex Dewar

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote:
> On 8/9/20 1:54 PM, Alex Dewar wrote:
> > This battery appears only to be used by a single board (DA850), so it
> > makes sense to add this to the Kconfig file so that users don't build
> > the module unnecessarily. It currently seems to be built for the x86
> > Arch Linux kernel where it's probably not doing much good.
>
> It would probably also make sense to add "default n" since it only
> applies to one board in the entire arch.

Ah ok. That makes sense. Would you like me to send a follow-on patch for
this?

Alex

>
> BATTERY_LEGO_EV3 is already explicitly set to "m" in the appropriate
> defconfig file, so I don't think it would break anything.
>
> >
> > Signed-off-by: Alex Dewar <[email protected]>
> > ---
> > drivers/power/supply/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> > index faf2830aa1527..9f76e2f47ac6d 100644
> > --- a/drivers/power/supply/Kconfig
> > +++ b/drivers/power/supply/Kconfig
> > @@ -164,7 +164,7 @@ config BATTERY_DS2782
> > config BATTERY_LEGO_EV3
> > tristate "LEGO MINDSTORMS EV3 battery"
> > - depends on OF && IIO && GPIOLIB
> > + depends on OF && IIO && GPIOLIB && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> > help
> > Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.
> >
>

2020-08-12 15:27:41

by David Lechner

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On 8/12/20 8:37 AM, Alex Dewar wrote:
> On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote:
>> On 8/9/20 1:54 PM, Alex Dewar wrote:
>>> This battery appears only to be used by a single board (DA850), so it
>>> makes sense to add this to the Kconfig file so that users don't build
>>> the module unnecessarily. It currently seems to be built for the x86
>>> Arch Linux kernel where it's probably not doing much good.
>>
>> It would probably also make sense to add "default n" since it only
>> applies to one board in the entire arch.
>
> Ah ok. That makes sense. Would you like me to send a follow-on patch for
> this?

You can just send a v2 patch that includes the change below and the
additional change.

>
> Alex
>
>>
>> BATTERY_LEGO_EV3 is already explicitly set to "m" in the appropriate
>> defconfig file, so I don't think it would break anything.
>>
>>>
>>> Signed-off-by: Alex Dewar <[email protected]>
>>> ---
>>> drivers/power/supply/Kconfig | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
>>> index faf2830aa1527..9f76e2f47ac6d 100644
>>> --- a/drivers/power/supply/Kconfig
>>> +++ b/drivers/power/supply/Kconfig
>>> @@ -164,7 +164,7 @@ config BATTERY_DS2782
>>> config BATTERY_LEGO_EV3
>>> tristate "LEGO MINDSTORMS EV3 battery"
>>> - depends on OF && IIO && GPIOLIB
>>> + depends on OF && IIO && GPIOLIB && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
>>> help
>>> Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.
>>>
>>

2020-08-12 19:04:12

by Alex Dewar

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On Wed, Aug 12, 2020 at 10:24:30AM -0500, David Lechner wrote:
> On 8/12/20 8:37 AM, Alex Dewar wrote:
> > On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote:
> > > On 8/9/20 1:54 PM, Alex Dewar wrote:
> > > > This battery appears only to be used by a single board (DA850), so it
> > > > makes sense to add this to the Kconfig file so that users don't build
> > > > the module unnecessarily. It currently seems to be built for the x86
> > > > Arch Linux kernel where it's probably not doing much good.
> > >
> > > It would probably also make sense to add "default n" since it only
> > > applies to one board in the entire arch.
> >
> > Ah ok. That makes sense. Would you like me to send a follow-on patch for
> > this?
>
> You can just send a v2 patch that includes the change below and the
> additional change.

I've just had a look at the documentation[1] and it seems that as there's
no "default y" there it'll default to n anyway. Have I got that right?

[1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes

>
> >
> > Alex
> >
> > >
> > > BATTERY_LEGO_EV3 is already explicitly set to "m" in the appropriate
> > > defconfig file, so I don't think it would break anything.
> > >
> > > >
> > > > Signed-off-by: Alex Dewar <[email protected]>
> > > > ---
> > > > drivers/power/supply/Kconfig | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig
> > > > index faf2830aa1527..9f76e2f47ac6d 100644
> > > > --- a/drivers/power/supply/Kconfig
> > > > +++ b/drivers/power/supply/Kconfig
> > > > @@ -164,7 +164,7 @@ config BATTERY_DS2782
> > > > config BATTERY_LEGO_EV3
> > > > tristate "LEGO MINDSTORMS EV3 battery"
> > > > - depends on OF && IIO && GPIOLIB
> > > > + depends on OF && IIO && GPIOLIB && (ARCH_DAVINCI_DA850 || COMPILE_TEST)
> > > > help
> > > > Say Y here to enable support for the LEGO MINDSTORMS EV3 battery.
> > > >
> > >
>

2020-08-12 19:18:26

by David Lechner

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On 8/12/20 2:02 PM, Alex Dewar wrote:
> On Wed, Aug 12, 2020 at 10:24:30AM -0500, David Lechner wrote:
>> On 8/12/20 8:37 AM, Alex Dewar wrote:
>>> On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote:
>>>> On 8/9/20 1:54 PM, Alex Dewar wrote:
>>>>> This battery appears only to be used by a single board (DA850), so it
>>>>> makes sense to add this to the Kconfig file so that users don't build
>>>>> the module unnecessarily. It currently seems to be built for the x86
>>>>> Arch Linux kernel where it's probably not doing much good.
>>>>
>>>> It would probably also make sense to add "default n" since it only
>>>> applies to one board in the entire arch.
>>>
>>> Ah ok. That makes sense. Would you like me to send a follow-on patch for
>>> this?
>>
>> You can just send a v2 patch that includes the change below and the
>> additional change.
>
> I've just had a look at the documentation[1] and it seems that as there's
> no "default y" there it'll default to n anyway. Have I got that right?
>
> [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes
>

Yes, that seems right. That makes me wonder why this would have been enabled in
the Arch Linux kernel for x86 then.

2020-08-17 17:47:31

by Alex Dewar

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On Wed, Aug 12, 2020 at 02:12:57PM -0500, David Lechner wrote:
> On 8/12/20 2:02 PM, Alex Dewar wrote:
> > On Wed, Aug 12, 2020 at 10:24:30AM -0500, David Lechner wrote:
> > > On 8/12/20 8:37 AM, Alex Dewar wrote:
> > > > On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote:
> > > > > On 8/9/20 1:54 PM, Alex Dewar wrote:
> > > > > > This battery appears only to be used by a single board (DA850), so it
> > > > > > makes sense to add this to the Kconfig file so that users don't build
> > > > > > the module unnecessarily. It currently seems to be built for the x86
> > > > > > Arch Linux kernel where it's probably not doing much good.
> > > > >
> > > > > It would probably also make sense to add "default n" since it only
> > > > > applies to one board in the entire arch.
> > > >
> > > > Ah ok. That makes sense. Would you like me to send a follow-on patch for
> > > > this?
> > >
> > > You can just send a v2 patch that includes the change below and the
> > > additional change.
> >
> > I've just had a look at the documentation[1] and it seems that as there's
> > no "default y" there it'll default to n anyway. Have I got that right?
> >
> > [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes
> >
>
> Yes, that seems right. That makes me wonder why this would have been enabled in
> the Arch Linux kernel for x86 then.

Not sure, maybe the Arch devs like Lego? ;-)

Are you happy to give an Acked-by for this anyhoo?

@Sebastian, are you happy to pick up this patch?

Best,
Alex

2020-08-17 18:30:12

by David Lechner

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

On 8/17/20 12:43 PM, Alex Dewar wrote:
> On Wed, Aug 12, 2020 at 02:12:57PM -0500, David Lechner wrote:
>> On 8/12/20 2:02 PM, Alex Dewar wrote:
>>> On Wed, Aug 12, 2020 at 10:24:30AM -0500, David Lechner wrote:
>>>> On 8/12/20 8:37 AM, Alex Dewar wrote:
>>>>> On Tue, Aug 11, 2020 at 09:24:10AM -0500, David Lechner wrote:
>>>>>> On 8/9/20 1:54 PM, Alex Dewar wrote:
>>>>>>> This battery appears only to be used by a single board (DA850), so it
>>>>>>> makes sense to add this to the Kconfig file so that users don't build
>>>>>>> the module unnecessarily. It currently seems to be built for the x86
>>>>>>> Arch Linux kernel where it's probably not doing much good.
>>>>>>
>>>>>> It would probably also make sense to add "default n" since it only
>>>>>> applies to one board in the entire arch.
>>>>>
>>>>> Ah ok. That makes sense. Would you like me to send a follow-on patch for
>>>>> this?
>>>>
>>>> You can just send a v2 patch that includes the change below and the
>>>> additional change.
>>>
>>> I've just had a look at the documentation[1] and it seems that as there's
>>> no "default y" there it'll default to n anyway. Have I got that right?
>>>
>>> [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes
>>>
>>
>> Yes, that seems right. That makes me wonder why this would have been enabled in
>> the Arch Linux kernel for x86 then.
>
> Not sure, maybe the Arch devs like Lego? ;-)
>
> Are you happy to give an Acked-by for this anyhoo?

Yup.

Acked-by: David Lechner <[email protected]>

>
> @Sebastian, are you happy to pick up this patch?
>
> Best,
> Alex
>

2020-08-25 14:00:14

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH] power: supply: Add dependency to lego-ev3-battery Kconfig options

Hi,

On Mon, Aug 17, 2020 at 01:25:45PM -0500, David Lechner wrote:
> Acked-by: David Lechner <[email protected]>

Thanks, queued.

-- Sebastian


Attachments:
(No filename) (156.00 B)
signature.asc (849.00 B)
Download all attachments