Skip to content

Commit 51b53dc

Browse files
committed
hwmon: Move the IIO client driver for hwmon out of staging
This driver uses channel maps, defined either through device tree or platform data, to create a hwmon driver which acts as a client for the underlying IIO device channels. Thus a general purpose IIO adc driver can be used to provide hardware monitoring using a subset of its channels. Signed-off-by: Jonathan Cameron <jic23@kernel.org> Acked-by: Guenter Roeck <linux@roeck-us.net> -- The only non move changes here concern the description and changes to the dependencies to IIO explicit and hwmon implicit. I'm proposing moving this into hwmon on the basis of placing drivers based on what they provide rather than what their underlying hardware is. drivers/hwmon/Kconfig | 9 ++ drivers/hwmon/Makefile | 1 + drivers/hwmon/iio_hwmon.c | 196 ++++++++++++++++++++++++++++++++++++++++ drivers/staging/iio/Kconfig | 8 -- drivers/staging/iio/Makefile | 2 - drivers/staging/iio/iio_hwmon.c | 196 ---------------------------------------- 6 files changed, 206 insertions(+), 206 deletions(-)
1 parent 3465a22 commit 51b53dc

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

drivers/hwmon/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -499,6 +499,15 @@ config SENSORS_IBMPEX
499499
This driver can also be built as a module. If so, the module
500500
will be called ibmpex.
501501

502+
config SENSORS_IIO_HWMON
503+
tristate "Hwmon driver that uses channels specified via iio maps"
504+
depends on IIO
505+
help
506+
This is a platform driver that in combination with a suitable
507+
map allows IIO devices to provide basic hwmon functionality
508+
for those channels specified in the map. This map can be provided
509+
either via platform data or the device tree bindings.
510+
502511
config SENSORS_IT87
503512
tristate "ITE IT87xx and compatibles"
504513
depends on !PPC

drivers/hwmon/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ obj-$(CONFIG_SENSORS_ULTRA45) += ultra45_env.o
6565
obj-$(CONFIG_SENSORS_I5K_AMB) += i5k_amb.o
6666
obj-$(CONFIG_SENSORS_IBMAEM) += ibmaem.o
6767
obj-$(CONFIG_SENSORS_IBMPEX) += ibmpex.o
68+
obj-$(CONFIG_SENSORS_IIO_HWMON) += iio_hwmon.o
6869
obj-$(CONFIG_SENSORS_INA209) += ina209.o
6970
obj-$(CONFIG_SENSORS_INA2XX) += ina2xx.o
7071
obj-$(CONFIG_SENSORS_IT87) += it87.o
File renamed without changes.

drivers/staging/iio/Kconfig

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44
menu "IIO staging drivers"
55
depends on IIO
66

7-
config IIO_ST_HWMON
8-
tristate "Hwmon driver that uses channels specified via iio maps"
9-
depends on HWMON
10-
help
11-
This is a platform driver that in combination with a suitable
12-
map allows IIO devices to provide basic hwmon functionality
13-
for those channels specified in the map.
14-
157
source "drivers/staging/iio/accel/Kconfig"
168
source "drivers/staging/iio/adc/Kconfig"
179
source "drivers/staging/iio/addac/Kconfig"

drivers/staging/iio/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_BUFFER) += iio_simple_dummy_buffer.o
99

1010
obj-$(CONFIG_IIO_DUMMY_EVGEN) += iio_dummy_evgen.o
1111

12-
obj-$(CONFIG_IIO_ST_HWMON) += iio_hwmon.o
13-
1412
obj-y += accel/
1513
obj-y += adc/
1614
obj-y += addac/

0 commit comments

Comments
 (0)