devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: adc: Maxim max961x driver
@ 2017-02-24 15:05 Jacopo Mondi
       [not found] ` <1487948756-25172-1-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
  2017-02-24 15:05 ` [PATCH 3/4] iio: adc: Add max9611/9612 ADC driver Jacopo Mondi
  0 siblings, 2 replies; 25+ messages in thread
From: Jacopo Mondi @ 2017-02-24 15:05 UTC (permalink / raw)
  To: geert, wsa+renesas, magnus.damm, laurent.pinchart, jic23,
	knaack.h, lars, meerw, robh+dt, mark.rutland
  Cc: linux-iio, linux-renesas-soc, devicetree

Hello!

This series adds driver and documentation for Maxim max9611/max9612
high-side current sense amplifier with 12-bit ADC and I2c interface.
It also registers two devices installed on VDD_0.8V and DVFS_0.8V lines
in Renesas r87796 Salvator-X board.

The device provides several functionalities, and only some of them are
currently supported by this driver.
Particularly, the on-board op-amp and analog comparator are not currently
supported.

A simplified integration schematic drawing is here reported:

 ----o----/\/\/-----o-------|LOAD|---
     |    shunt     |
 ____|______________|___
 |  RS+            RS-  |
 |   |-----gain-----|   |
 |          |           |
 |          |           |
 |max961x   |->| ADC |===== I2c
 |______________________|


The device provides though its 12-bits ADC the following informations:
- Common input voltage on RS+
- Voltage drop between RS+ and RS- ends
- Die temperature

All of the above ones are exposed though IIO with _raw and _scale values
(plus _input for milli degree Celsius die temperature).

>From the above values the driver calculates the current flowing between
RS+ and RS- ends, using the shunt resistor value provided by device tree, and
the power load. Again this values are exposed through _raw and _scale
attributes, which I'm not completely sure it's acceptables as they are
calculated values and not natively provided by the current sense amplifier.
I would like to hear IIO people opinions on this, if they should be better
exposed though some other attributes which are not _raw and _scale, or if
their calculation should be completely left to userspace tools.

Thanks
   j

Jacopo Mondi (4):
  Documentation: dt-bindings: iio: Add max961x
  iio: Documentation: Add max961x sysfs documentation
  iio: adc: Add max9611/9612 ADC driver
  arm64: dts: salvator-x: Add current sense amplifiers

 .../ABI/testing/sysfs-bus-iio-adc-max961x          |   5 +
 .../devicetree/bindings/iio/adc/max961x.txt        |  27 +
 arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts |  17 +
 drivers/iio/adc/Kconfig                            |  10 +
 drivers/iio/adc/Makefile                           |   1 +
 drivers/iio/adc/max961x.c                          | 648 +++++++++++++++++++++
 6 files changed, 708 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-adc-max961x
 create mode 100644 Documentation/devicetree/bindings/iio/adc/max961x.txt
 create mode 100644 drivers/iio/adc/max961x.c

-- 
2.7.4

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

end of thread, other threads:[~2017-03-22 20:43 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-24 15:05 [PATCH 0/4] iio: adc: Maxim max961x driver Jacopo Mondi
     [not found] ` <1487948756-25172-1-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2017-02-24 15:05   ` [PATCH 1/4] Documentation: dt-bindings: iio: Add max961x Jacopo Mondi
     [not found]     ` <1487948756-25172-2-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2017-02-24 15:22       ` Geert Uytterhoeven
     [not found]         ` <CAMuHMdU9UL9ZyiPJqtTTNS=KOScu6M3c7jQgD1vZ+gTiTCAYMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-24 15:33           ` Lars-Peter Clausen
     [not found]             ` <64ed3cde-7627-eb60-c507-b68447012502-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2017-02-24 15:48               ` jacopo mondi
2017-02-25 15:19                 ` Jonathan Cameron
     [not found]                   ` <a0217564-0730-16f2-491f-86ea3561dc2e-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-02-25 15:34                     ` Geert Uytterhoeven
2017-02-25 15:56                       ` Jonathan Cameron
2017-02-24 15:29       ` Geert Uytterhoeven
     [not found]         ` <CAMuHMdWjtRZpjGi8BPkDGKGPr5uBr5jsjLi80COUDruZLuTXfQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-02-24 15:50           ` jacopo mondi
2017-02-24 15:54             ` Geert Uytterhoeven
2017-02-24 15:05   ` [PATCH 2/4] iio: Documentation: Add max961x sysfs documentation Jacopo Mondi
     [not found]     ` <1487948756-25172-3-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2017-02-25 15:54       ` Jonathan Cameron
     [not found]         ` <56b35a65-a23d-68ac-17d6-cf46f9352ab7-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-03-21 16:09           ` jacopo
2017-03-22 20:43             ` Jonathan Cameron
2017-02-24 15:05   ` [PATCH 4/4] arm64: dts: salvator-x: Add current sense amplifiers Jacopo Mondi
2017-02-25 16:09   ` [PATCH 0/4] iio: adc: Maxim max961x driver Jonathan Cameron
     [not found]     ` <f6b94b05-c0f8-239e-733d-dc93a7683184-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-02-27  9:09       ` jacopo mondi
     [not found]         ` <9a1d0108-8508-adc5-8985-d1133a3317fd-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2017-03-05 10:49           ` Jonathan Cameron
     [not found]             ` <3e4b368b-102b-e626-3777-97e49bb5ae56-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-03-07 19:12               ` jacopo mondi
     [not found]                 ` <4a8af859-7fe8-3ef9-21b5-42cbb41eb36b-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2017-03-13 20:41                   ` Jonathan Cameron
2017-02-24 15:05 ` [PATCH 3/4] iio: adc: Add max9611/9612 ADC driver Jacopo Mondi
     [not found]   ` <1487948756-25172-4-git-send-email-jacopo+renesas-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org>
2017-02-25 15:53     ` Jonathan Cameron
     [not found]       ` <61af9d83-ec8f-33f9-52b5-feb50b399edd-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2017-02-27  7:45         ` jacopo mondi
2017-03-05 10:39           ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).