From: <Marius.Cristea@microchip.com>
To: <jic23@kernel.org>, <krzk@kernel.org>
Cc: <devicetree@vger.kernel.org>, <lars@metafoo.de>,
<linux-iio@vger.kernel.org>, <robh+dt@kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] dt-bindings: iio: adc: adding dt-bindings for PAC193X
Date: Mon, 6 Mar 2023 13:53:27 +0000 [thread overview]
Message-ID: <2f1a14522a7a8d46e3b037a285af4c3dd9b17cbc.camel@microchip.com> (raw)
In-Reply-To: <20230225171723.15e822ec@jic23-huawei>
Hi Jonathan,
Thank you so much! I'm happy to contribute to IIO.
I will remove some section because I agree with the propose solution.
For the rest I will comment below..
On Sat, 2023-02-25 at 17:17 +0000, Jonathan Cameron wrote:
> > > +
> > > + microchip,samp-rate:
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > + description: Sampling rate for all device's channels.
> >
> > What are the units? rate is usually in hz, which should be
> > expressed in
> > unit suffix (property name)]
>
> It's unusual for sampling rate to be a property of the hardware and
> hence
> suitable for DT binding. Normally we make this a userspace control
> instead.
> If there is a reason for doing it from DT, that wants to be mentioned
> here.
>
Here I could change it into the datarate (as in
iio/adc/ti,ads1015.yaml). The units are samples per second. My
intention was to be alingned with the datasheet.
My intention was to let the user configure the sample rate as soon as
posile during the startup (the PAC device's own power consumtion will
increase with the sampling rate - default the chip will start with the
maximum samples per second).
>
>
> >
> > > +
> > > + microchip,bi-directional:
> > > + description: Whether the channel is bi-directional.
> >
> > Describe here what is a "bi-directional" channel for ADC... Maybe
> > it is
> > obvious, maybe not. For me it is not and none of other devices have
> > it.
> >
> From datasheet this seems to be a novel description of whether the
> ADC
> is measuring just positive or allows for negative voltage as well
> (i.e.
> the current through the shut resistor is going on the other
> direction).
> Can we relate this to a biopolar / unipolar decision on a simple
> voltage ADC?
> For that we have standard DT bindings in iio/adc/adc.yaml
>
Yes, the PAC device can measure voltages as unipolar or bipolar but
also current as unidirectional or bidirectional (we are measuring the
voltage across a shunt resistor). We are also reporting power and is
not a "usual" thing to report power as unipolar or bipolar. Bi-
directional power makes more sens if you are thinking to monitor a
charge discharge cycle for a battery pack.
Thanks,
Marius
next prev parent reply other threads:[~2023-03-06 13:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-20 12:32 [PATCH v1 0/2] adding support for Microchip PAC193X Power Monitor marius.cristea
2023-02-20 12:32 ` [PATCH v1 1/2] dt-bindings: iio: adc: adding dt-bindings for PAC193X marius.cristea
2023-02-21 13:44 ` Krzysztof Kozlowski
2023-02-25 17:17 ` Jonathan Cameron
2023-03-06 13:53 ` Marius.Cristea [this message]
2023-03-06 16:09 ` Krzysztof Kozlowski
2023-03-06 16:26 ` Jonathan Cameron
2023-02-20 12:32 ` [PATCH v1 2/2] iio: adc: adding support for pac193x marius.cristea
2023-02-20 20:04 ` kernel test robot
2023-02-20 21:36 ` kernel test robot
2023-02-21 13:46 ` Krzysztof Kozlowski
2023-02-25 17:19 ` Jonathan Cameron
2023-02-25 17:22 ` Jonathan Cameron
2023-03-06 13:56 ` Marius.Cristea
2023-02-25 19:27 ` Jonathan Cameron
2023-03-06 15:42 ` Marius.Cristea
2023-03-12 16:42 ` Jonathan Cameron
2023-03-23 15:15 ` Marius.Cristea
2023-03-25 18:06 ` Jonathan Cameron
2023-02-25 17:11 ` [PATCH v1 0/2] adding support for Microchip PAC193X Power Monitor Jonathan Cameron
2023-03-06 14:03 ` Marius.Cristea
2023-03-12 16:45 ` Jonathan Cameron
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=2f1a14522a7a8d46e3b037a285af4c3dd9b17cbc.camel@microchip.com \
--to=marius.cristea@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzk@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.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).