[RFC] iodevice support

Sascha Hauer s.hauer at pengutronix.de
Tue Dec 8 01:05:35 PST 2015


The following is something like a mixture of Linux IIO and hwmon support
for the poor. I called it iodevice, but better names are appreciated.
A iodevice has multiple channels, each providing a value like for
example a temperature or a voltage. For each iodevice we provide device
parameters to access the values from the commandline. The C API for a
consumer consists of iochannel_get() to get a iochannel, and
iochannel_get_value() to actually read a value.
As drivers we currently have a LM75 temperature driver and a MCP342x ADC
driver. Also there is a PT100 driver which itself is a consumer of
another iodevice, a MCP342x in my case. This is more meant as an example
since the voltage to temperature conversion function is board specific.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      misc: Add iodevice support
      misc: Add basic LM75 temperature driver
      misc: Add Microchip MCP342x support
      misc: Add PT100 temperature sensor support

 drivers/misc/Kconfig    |  18 ++++
 drivers/misc/Makefile   |   5 +
 drivers/misc/iodevice.c | 109 ++++++++++++++++++++
 drivers/misc/lm75.c     | 262 ++++++++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/mcp342x.c  | 259 +++++++++++++++++++++++++++++++++++++++++++++++
 drivers/misc/pt100.c    | 145 +++++++++++++++++++++++++++
 include/iodevice.h      |  33 ++++++
 7 files changed, 831 insertions(+)
 create mode 100644 drivers/misc/iodevice.c
 create mode 100644 drivers/misc/lm75.c
 create mode 100644 drivers/misc/mcp342x.c
 create mode 100644 drivers/misc/pt100.c
 create mode 100644 include/iodevice.h



More information about the barebox mailing list