From: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
corbet-T1hC0tSOHrs@public.gmane.org,
lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-hwmon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>,
Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Subject: Re: [PATCH 2/3] iio: adc: ina3221: Add support for IIO ADC driver for TI INA3221
Date: Fri, 3 Jun 2016 16:56:56 +0530 [thread overview]
Message-ID: <57516980.1040907@nvidia.com> (raw)
In-Reply-To: <44e28639-67b6-7586-5e6d-c0180ccded79-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On Friday 03 June 2016 03:36 PM, Jonathan Cameron wrote:
> On 01/06/16 13:34, Laxman Dewangan wrote:
>> Add support for INA3221 SW driver via IIO ADC interface. The device is
>> register as iio-device and provides interface for voltage/current and power
>> monitor. Also provide interface for setting oneshot/continuous mode and
>> critical/warning threshold for the shunt voltage drop.
>>
>> Signed-off-by: Laxman Dewangan <ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Hi Laxman,
>
> As ever with any driver lying on the border of IIO and hwmon, please include
> a short justification of why you need an IIO driver and also cc the
> hwmon list + maintainers. (cc'd on this reply).
>
> I simply won't take a driver where the hwmon maintainers aren't happy.
> As it stands I'm not seeing obvious reasons in the code for why this
> should be an IIO device.
I thought that all ADC or monitors are going to be part of IIO device
framework. I saw the ina2xx which is same (single channel) which was my
reference point.
> Funily enough I know this datasheet a little as was evaluating
> it for use on some boards at the day job a week or so ago.
>
> Various comments inline. Major points are:
> * Don't use 'fake' channels to control events. If the events infrastructure
> doesn't handle your events, then fix that rather than working around it.
> * There is a lot of ABI in here concerned with oneshot vs continuous.
> This seems to me to be more than it should be. We wouldn't expect to
> see stuff changing as a result of switching between these modes other
> than wrt to when the data shows up. So I'd expect to not see this
> directly exposed at all - but rather sit in oneshot unless either:
> 1) Buffered mode is running (not currently supported)
> 2) Alerts are on - which I think requires it to be in continuous mode.
>
> Other question to my mind is whether we should be reporting vshunt or
> (using device tree to pass resistance) current.
This is bus and shunt voltage device for power monitoring. In our
platforms, we use this device for bus current and so power monitor.
We have two usecases, one is one shot, read when it needs it. And other
continuous when we have multiple core running then continuous mode to
get the power consumption by rail.
Yaah, alert is used only on continuous mode and mainly used for
throttling when rail power goes beyond some limit.
next prev parent reply other threads:[~2016-06-03 11:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-01 12:34 [PATCH 1/3] iio: adc: ina3221: Add DT binding details Laxman Dewangan
2016-06-01 12:34 ` [PATCH 2/3] iio: adc: ina3221: Add support for IIO ADC driver for TI INA3221 Laxman Dewangan
2016-06-03 10:06 ` Jonathan Cameron
2016-06-03 10:16 ` Jonathan Cameron
2016-06-03 11:31 ` Laxman Dewangan
[not found] ` <57516A74.4060008-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-03 12:04 ` Jonathan Cameron
[not found] ` <42c00dfb-bb45-405c-a1d2-516ece137826-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-06-03 12:03 ` Laxman Dewangan
[not found] ` <44e28639-67b6-7586-5e6d-c0180ccded79-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2016-06-03 11:26 ` Laxman Dewangan [this message]
2016-06-03 12:09 ` Jonathan Cameron
2016-06-03 12:17 ` Laxman Dewangan
2016-06-03 13:29 ` Guenter Roeck
2016-06-03 14:14 ` Laxman Dewangan
2016-06-03 15:17 ` Andrew F. Davis
2016-06-07 22:30 ` Guenter Roeck
2016-06-08 15:04 ` Andrew F. Davis
2016-06-08 15:37 ` Laxman Dewangan
2016-06-01 12:34 ` [PATCH 3/3] iio: adc: ina3221: Add sysfs details " Laxman Dewangan
2016-06-03 10:26 ` Jonathan Cameron
[not found] ` <1464784454-7988-1-git-send-email-ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-06-03 2:07 ` [PATCH 1/3] iio: adc: ina3221: Add DT binding details Rob Herring
2016-06-03 9:02 ` Laxman Dewangan
2016-06-03 10:19 ` Jonathan Cameron
2016-06-03 11:48 ` Laxman Dewangan
2016-06-03 12:11 ` Jonathan Cameron
2016-06-03 12:21 ` Laxman Dewangan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57516980.1040907@nvidia.com \
--to=ldewangan-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=corbet-T1hC0tSOHrs@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-hwmon-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).