Skip to contentSkip to conversation

iio: cros_ec: Fix Kconfig dependency on CROS_EC_SENSORHUB

PATCH In review Andy Shevchenko 2 participants 3 messages Aug 6, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: cros_ec: Fix Kconfig dependency on CROS_EC_SENSORHUB

When CONFIG_CROS_EC_SENSORHUB is set to m, the IIO_CROS_EC_SENSORS_CORE can't be built-in.

Fixes 53067471188c ("iio / platform: cros_ec: Add cros-ec-sensorhub driver")
---
 drivers/iio/common/cros_ec_sensors/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/common/cros_ec_sensors/Kconfig +2 -1
index fefad9572790..b0d67ceaed55 100644
@@ -4,7 +4,8 @@
 #
 config IIO_CROS_EC_SENSORS_CORE
 	tristate "ChromeOS EC Sensors Core"
-	depends on SYSFS && CROS_EC_SENSORHUB
+	depends on CROS_EC_SENSORHUB=y || (CROS_EC_SENSORHUB=m && m)
+	depends on SYSFS
 	select IIO_BUFFER
 	select IIO_TRIGGERED_BUFFER
 	help
Signature · 1 line
2.30.2
#1 lore raw
Quoted 4 lines · Andy Shevchenko

When CONFIG_CROS_EC_SENSORHUB is set to m, the IIO_CROS_EC_SENSORS_CORE can't be built-in.

Looking again into .config actually puzzles me, there shouldn't be build errors.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
In reply to Andy Shevchenko

Trying again, text only this time. Sorry for the trouble.

Quoted 17 lines · Andy Shevchenko

When CONFIG_CROS_EC_SENSORHUB is set to m, the IIO_CROS_EC_SENSORS_CORE can't be built-in.

Fixes 53067471188c ("iio / platform: cros_ec: Add cros-ec-sensorhub driver")
---
 drivers/iio/common/cros_ec_sensors/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/common/cros_ec_sensors/Kconfig +0 -0
index fefad9572790..b0d67ceaed55 100644

drivers/iio/common/cros_ec_sensors/Kconfig line 8

Quoted 6 lines
drivers/iio/common/cros_ec_sensors/Kconfig +2 -1
@@ -4,7 +4,8 @@
 #
 config IIO_CROS_EC_SENSORS_CORE
        tristate "ChromeOS EC Sensors Core"
-       depends on SYSFS && CROS_EC_SENSORHUB
+       depends on CROS_EC_SENSORHUB=y || (CROS_EC_SENSORHUB=m && m)
+       depends on SYSFS

This seems wrong. IIO_CROS_EC_SENSORS_CORE should already be limited to m if CROS_EC_SENSORHUB=m.

Note that I can not reproduce the problem in the bugzilla entry, neither with mainline
nor with v5.13.6. And the configuration file published there looks fine and already has IIO_CROS_EC_SENSORS_CORE=m.

Guenter

Quoted 6 lines
drivers/iio/common/cros_ec_sensors/Kconfig +0 -1
        select IIO_BUFFER
        select IIO_TRIGGERED_BUFFER
        help
--

2.30.2