power: supply: Add dependency to lego-ev3-battery Kconfig options
diff mbox series

Message ID 20200809185444.54247-1-alex.dewar90@gmail.com
State In Next
Commit 8fada2d4c213e7625124a24784c460cefc17c700
Headers show
Series
  • power: supply: Add dependency to lego-ev3-battery Kconfig options
Related show

Commit Message

Alex Dewar Aug. 9, 2020, 6:54 p.m. UTC
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 <alex.dewar90@gmail.com>
---
 drivers/power/supply/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Lechner Aug. 11, 2020, 2:24 p.m. UTC | #1
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 <alex.dewar90@gmail.com>
> ---
>   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.
>   
>
Alex Dewar Aug. 12, 2020, 1:37 p.m. UTC | #2
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 <alex.dewar90@gmail.com>
> > ---
> >   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.
> > 
>
David Lechner Aug. 12, 2020, 3:24 p.m. UTC | #3
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 <alex.dewar90@gmail.com>
>>> ---
>>>    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.
>>>
>>
Alex Dewar Aug. 12, 2020, 7:02 p.m. UTC | #4
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 <alex.dewar90@gmail.com>
> > > > ---
> > > >    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.
> > > > 
> > > 
>
David Lechner Aug. 12, 2020, 7:12 p.m. UTC | #5
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.
Alex Dewar Aug. 17, 2020, 5:43 p.m. UTC | #6
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
David Lechner Aug. 17, 2020, 6:25 p.m. UTC | #7
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 <david@lechnology.com>

> 
> @Sebastian, are you happy to pick up this patch?
> 
> Best,
> Alex
>
Sebastian Reichel Aug. 25, 2020, 1:58 p.m. UTC | #8
Hi,

On Mon, Aug 17, 2020 at 01:25:45PM -0500, David Lechner wrote:
> Acked-by: David Lechner <david@lechnology.com>

Thanks, queued.

-- Sebastian

Patch
diff mbox series

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.