Message ID | 20200809185444.54247-1-alex.dewar90@gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | power: supply: Add dependency to lego-ev3-battery Kconfig options | expand |
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. > >
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. > > >
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. >>> >>
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. > > > > > > > >
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.
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
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 >
Hi,
On Mon, Aug 17, 2020 at 01:25:45PM -0500, David Lechner wrote:
> Acked-by: David Lechner <david@lechnology.com>
Thanks, queued.
-- Sebastian
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.
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(-)