Skip to contentSkip to conversation

hwmon: Move the IIO client driver for hwmon out of staging

PATCH In review Jonathan Cameron 2 participants 3 messages Mar 20, 2013 – Mar 21, 2013

Subsystems (4)
lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

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

--
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(-)
drivers/hwmon/Kconfig +9 -0
index 89ac1cb..96e00c9 100644
@@ -499,6 +499,15 @@ config SENSORS_IBMPEX
 	  This driver can also be built as a module.  If so, the module
 	  will be called ibmpex.
 
+config SENSORS_IIO_HWMON
+      	tristate "Hwmon driver that uses channels specified via iio maps"
+	depends on IIO
+	help
+	  This is a platform driver that in combination with a suitable
+	  map allows IIO devices to provide basic hwmon functionality
+	  for those channels specified in the map.  This map can be provided
+	  either via platform data or the device tree bindings.
+
 config SENSORS_IT87
 	tristate "ITE IT87xx and compatibles"
 	depends on !PPC
drivers/hwmon/Makefile +1 -0
index 8d6d97e..a87fdab 100644
@@ -65,6 +65,7 @@ obj-$(CONFIG_SENSORS_ULTRA45)	+= ultra45_env.o
 obj-$(CONFIG_SENSORS_I5K_AMB)	+= i5k_amb.o
 obj-$(CONFIG_SENSORS_IBMAEM)	+= ibmaem.o
 obj-$(CONFIG_SENSORS_IBMPEX)	+= ibmpex.o
+obj-$(CONFIG_SENSORS_IIO_HWMON) += iio_hwmon.o
 obj-$(CONFIG_SENSORS_INA209)	+= ina209.o
 obj-$(CONFIG_SENSORS_INA2XX)	+= ina2xx.o
 obj-$(CONFIG_SENSORS_IT87)	+= it87.o
drivers/hwmon/iio_hwmon.c new file +196 -0

196 lines not on this page · raw message

drivers/staging/iio/Kconfig +0 -8
index dc26717..db4d6dc 100644
@@ -4,14 +4,6 @@
 menu "IIO staging drivers"
 	depends on IIO
 
-config IIO_ST_HWMON
-	tristate "Hwmon driver that uses channels specified via iio maps"
-	depends on HWMON
-	help
-	  This is a platform driver that in combination with a suitable
-	  map allows IIO devices to provide  basic hwmon functionality
-	  for those channels specified in the map.
-
 source "drivers/staging/iio/accel/Kconfig"
 source "drivers/staging/iio/adc/Kconfig"
 source "drivers/staging/iio/addac/Kconfig"
drivers/staging/iio/Makefile +0 -2
index 158e0a0..d871061 100644
@@ -9,8 +9,6 @@ iio_dummy-$(CONFIG_IIO_SIMPLE_DUMMY_BUFFER) += iio_simple_dummy_buffer.o
 
 obj-$(CONFIG_IIO_DUMMY_EVGEN) += iio_dummy_evgen.o
 
-obj-$(CONFIG_IIO_ST_HWMON) += iio_hwmon.o
-
 obj-y += accel/
 obj-y += adc/
 obj-y += addac/
drivers/staging/iio/iio_hwmon.c deleted +0 -196

196 lines not on this page · raw message

Signature · 1 line
1.8.1.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jonathan Cameron

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.

Quoted 9 lines

--
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.

That is what I would suggest as well.

I assume you will take this through the iio tree, as it depends on my previous patch, correct ?

Thanks,
Guenter

author maintainer
#2 lore raw
Quoted 17 lines · Guenter Roeck
Quoted 8 lines · Jonathan Cameron

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.

Quoted 5 lines

--
The only non move changes here concern the description and changes to the dependencies to IIO explicit and hwmon implicit.

Quoted 8 lines
Quoted 4 lines

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.

That is what I would suggest as well.

I assume you will take this through the iio tree, as it depends on my previous patch, correct ?

Yes. All moves from staging like this one (rather than rewrites) go through
GregKH's staging tree anyway so routing through IIO (which he pulls into there) is definitely the way to go.

Jonathan

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors