Re: [PATCH] hwmon: Add KEBA battery monitoring controller support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/9/25 01:16, Gerhard Engleder wrote:
On 09.03.25 09:23, Thomas Weißschuh wrote:
On 2025-03-09 08:38:06+0100, Gerhard Engleder wrote:
On 08.03.25 23:23, Thomas Weißschuh wrote:
On 2025-03-08 22:23:46+0100, Gerhard Engleder wrote:

<snip>

diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 4cbaba15d86e..ec396252cc18 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -335,6 +335,18 @@ config SENSORS_K10TEMP
         This driver can also be built as a module. If so, the module
         will be called k10temp.
+config SENSORS_KBATT
+    tristate "KEBA battery controller support"
+    depends on HAS_IOMEM
+    depends on KEBA_CP500 || COMPILE_TEST

KEBA_CP500 already has a COMPILE_TEST variant.
Duplicating it here looks unnecessary.
Then the HAS_IOMEM and AUXILIARY_BUS references can go away.

With COMPILE_TEST here the driver can be compile tested individually.
Is this property not worth it? But I can change it if needed.

COMPILE_TEST is meant to break dependencies on concrete platforms.
KEBA_CP500 itself is not a platform dependency.
The platform dependencies of KERBA_CP500 are already broken through
COMPILE_TEST.

Ok, I will change it.


FWIW, all those COMPILE_TEST dependencies are pointless:

drivers/i2c/busses/Kconfig:     depends on KEBA_CP500 || COMPILE_TEST
drivers/misc/keba/Kconfig:      depends on KEBA_CP500 || COMPILE_TEST
drivers/spi/Kconfig:    depends on KEBA_CP500 || COMPILE_TEST

On top of that, both SPI_KSPI2 and I2C_KEBA select AUXILIARY_BUS
which is equally pointless because KEBA_CP500 already does that.
I2C_KEBA depends on HAS_IOMEM but I2C itself already depends on it.

It is also ... odd ... that KEBA_CP500 depends on I2C. So it isn't
possible to enable any of its sub-devices without also enabling I2C.
It is not immediately obvious why this would be necessary.

Guenter





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux