iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER
authorAlexandru Ardelean <aardelean@deviqon.com>
Wed, 14 Apr 2021 08:49:55 +0000 (11:49 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 10 May 2021 13:01:48 +0000 (14:01 +0100)
During commit 067fda1c065ff ("iio: hid-sensors: move triggered buffer
setup into hid_sensor_setup_trigger"), the
iio_triggered_buffer_{setup,cleanup}() functions got moved under the
hid-sensor-trigger module.

The above change works fine, if any of the sensors get built. However, when
only the common hid-sensor-trigger module gets built (and none of the
drivers), then the IIO_TRIGGERED_BUFFER symbol isn't selected/enforced.

Previously, each driver would enforce/select the IIO_TRIGGERED_BUFFER
symbol. With this change the HID_SENSOR_IIO_TRIGGER (for the
hid-sensor-trigger module) will enforce that IIO_TRIGGERED_BUFFER gets
selected.

All HID sensor drivers select the HID_SENSOR_IIO_TRIGGER symbol. So, this
change removes the IIO_TRIGGERED_BUFFER enforcement from each driver.

Fixes: 067fda1c065ff ("iio: hid-sensors: move triggered buffer setup into hid_sensor_setup_trigger")
Reported-by: Thomas Deutschmann <whissi@gentoo.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://lore.kernel.org/r/20210414084955.260117-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/Kconfig
drivers/iio/common/hid-sensors/Kconfig
drivers/iio/gyro/Kconfig
drivers/iio/humidity/Kconfig
drivers/iio/light/Kconfig
drivers/iio/magnetometer/Kconfig
drivers/iio/orientation/Kconfig
drivers/iio/pressure/Kconfig
drivers/iio/temperature/Kconfig

index cceda3c..8b17236 100644 (file)
@@ -229,7 +229,6 @@ config DMARD10
 config HID_SENSOR_ACCEL_3D
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID Accelerometers 3D"
index 24d4925..2a3dd3b 100644 (file)
@@ -19,6 +19,7 @@ config HID_SENSOR_IIO_TRIGGER
        tristate "Common module (trigger) for all HID Sensor IIO drivers"
        depends on HID_SENSOR_HUB && HID_SENSOR_IIO_COMMON && IIO_BUFFER
        select IIO_TRIGGER
+       select IIO_TRIGGERED_BUFFER
        help
          Say yes here to build trigger support for HID sensors.
          Triggers will be send if all requested attributes were read.
index 5824f2e..20b5ac7 100644 (file)
@@ -111,7 +111,6 @@ config FXAS21002C_SPI
 config HID_SENSOR_GYRO_3D
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID Gyroscope 3D"
index 6549fcf..2de5494 100644 (file)
@@ -52,7 +52,6 @@ config HID_SENSOR_HUMIDITY
        tristate "HID Environmental humidity sensor"
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        help
index 33ad4dd..917f9be 100644 (file)
@@ -256,7 +256,6 @@ config ISL29125
 config HID_SENSOR_ALS
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID ALS"
@@ -270,7 +269,6 @@ config HID_SENSOR_ALS
 config HID_SENSOR_PROX
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID PROX"
index 5d4ffd6..74ad570 100644 (file)
@@ -95,7 +95,6 @@ config MAG3110
 config HID_SENSOR_MAGNETOMETER_3D
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID Magenetometer 3D"
index a505583..396cbbb 100644 (file)
@@ -9,7 +9,6 @@ menu "Inclinometer sensors"
 config HID_SENSOR_INCLINOMETER_3D
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID Inclinometer 3D"
@@ -20,7 +19,6 @@ config HID_SENSOR_INCLINOMETER_3D
 config HID_SENSOR_DEVICE_ROTATION
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID Device Rotation"
index 689b978..fc0d3cf 100644 (file)
@@ -79,7 +79,6 @@ config DPS310
 config HID_SENSOR_PRESS
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        tristate "HID PRESS"
index f1f2a14..4df6008 100644 (file)
@@ -45,7 +45,6 @@ config HID_SENSOR_TEMP
        tristate "HID Environmental temperature sensor"
        depends on HID_SENSOR_HUB
        select IIO_BUFFER
-       select IIO_TRIGGERED_BUFFER
        select HID_SENSOR_IIO_COMMON
        select HID_SENSOR_IIO_TRIGGER
        help