Skip to contentSkip to conversation

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

PATCH In review Alex Dewar 3 participants 9 messages Aug 9, 2020 – Aug 25, 2020 Power supply

lore
Share & tools
lore

Alex Dewar

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/power/supply/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/Kconfig +1 -1
index faf2830aa1527..9f76e2f47ac6d 100644
@@ -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.
 
Signature · 1 line
2.28.0
#1 lore raw
Quoted 4 lines · Alex Dewar

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.

Quoted 20 lines
---
  drivers/power/supply/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/Kconfig +1 -1
index faf2830aa1527..9f76e2f47ac6d 100644
@@ -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.
 
author
#2 lore raw
Quoted 8 lines · David Lechner
Quoted 4 lines · Alex Dewar

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

Quoted 23 lines

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

Quoted 18 lines
---
  drivers/power/supply/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/Kconfig +1 -1
index faf2830aa1527..9f76e2f47ac6d 100644
@@ -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.
 
#3 lore raw
Quoted 7 lines · Alex Dewar
Quoted 6 lines · David Lechner
Quoted 4 lines · Alex Dewar

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.

Quoted 5 lines
Quoted 2 lines

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.

Quoted 26 lines

Alex

Quoted 23 lines

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

Quoted 18 lines
---
   drivers/power/supply/Kconfig | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/Kconfig +1 -1
index faf2830aa1527..9f76e2f47ac6d 100644
@@ -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.
 
author
#4 lore raw
Quoted 8 lines · David Lechner
Quoted 7 lines · Alex Dewar
Quoted 6 lines · David Lechner
Quoted 4 lines · Alex Dewar

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.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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

Quoted 28 lines
Quoted 27 lines

Alex

Quoted 23 lines

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

Quoted 18 lines
---
   drivers/power/supply/Kconfig | 2 +-
   1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/Kconfig +1 -1
index faf2830aa1527..9f76e2f47ac6d 100644
@@ -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.
 
#5 lore raw
Quoted 15 lines · Alex Dewar
Quoted 14 lines · David Lechner
Quoted 12 lines · Alex Dewar
Quoted 8 lines · David Lechner
Quoted 4 lines · Alex Dewar

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?

Quoted 8 lines
Quoted 2 lines

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.

author
#6 lore raw
Quoted 19 lines · David Lechner
Quoted 18 lines · Alex Dewar
Quoted 16 lines · David Lechner
Quoted 7 lines · Alex Dewar
Quoted 6 lines · David Lechner
Quoted 4 lines · Alex Dewar

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.

Quoted 5 lines
Quoted 2 lines

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.

Quoted 8 lines
Quoted 5 lines

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

Acked-by
#7 lore raw
Quoted 26 lines · Alex Dewar
Quoted 25 lines · David Lechner
Quoted 23 lines · Alex Dewar
Quoted 8 lines · David Lechner
Quoted 7 lines · Alex Dewar
Quoted 6 lines · David Lechner
Quoted 4 lines · Alex Dewar

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.

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

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

Quoted 6 lines
Quoted 2 lines

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.

Quoted 6 lines

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

Best,
Alex