mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC] iodevice support
@ 2015-12-08  9:05 Sascha Hauer
  2015-12-08  9:05 ` [PATCH 1/4] misc: Add " Sascha Hauer
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Sascha Hauer @ 2015-12-08  9:05 UTC (permalink / raw)
  To: Barebox List

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

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-12-11  7:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08  9:05 [RFC] iodevice support Sascha Hauer
2015-12-08  9:05 ` [PATCH 1/4] misc: Add " Sascha Hauer
2015-12-10 20:42   ` Trent Piepho
2015-12-11  7:37     ` Sascha Hauer
2015-12-08  9:05 ` [PATCH 2/4] misc: Add basic LM75 temperature driver Sascha Hauer
2015-12-08  9:05 ` [PATCH 3/4] misc: Add Microchip MCP342x support Sascha Hauer
2015-12-08  9:05 ` [PATCH 4/4] misc: Add PT100 temperature sensor support Sascha Hauer
2015-12-10  6:24 ` [RFC] iodevice support Andrey Smirnov
2015-12-10 10:25   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox