From: Jonathan Cameron <jic23@kernel.org>
To: "Nuno Sá" <noname.nuno@gmail.com>
Cc: Dumitru Ceclan <mitrutzceclan@gmail.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ceclan Dumitru <dumitru.ceclan@analog.com>
Subject: Re: [PATCH v5 5/5] iio: amplifiers: hmc425a: add support for LTC6373 Instrumentation Amplifier
Date: Sat, 24 Feb 2024 17:54:48 +0000 [thread overview]
Message-ID: <20240224175448.484ccd10@jic23-huawei> (raw)
In-Reply-To: <c92c4c71f433c7375588e832d3c084a50190a1b5.camel@gmail.com>
On Wed, 21 Feb 2024 14:23:51 +0100
Nuno Sá <noname.nuno@gmail.com> wrote:
> On Tue, 2024-02-20 at 17:34 +0200, Dumitru Ceclan wrote:
> > This adds support for LTC6373 36 V Fully-Differential Programmable-Gain
> > Instrumentation Amplifier with 25 pA Input Bias Current.
> > The user can program the gain to one of seven available settings through
> > a 3-bit parallel interface (A2 to A0).
> >
> > Signed-off-by: Dumitru Ceclan <mitrutzceclan@gmail.com>
> > ---
>
> Just one minor comment. With that:
>
> Reviewed-by: Nuno Sa <nuno.sa@analog.com>
>
> > drivers/iio/amplifiers/hmc425a.c | 124 ++++++++++++++++++++++++++++++-
> > 1 file changed, 120 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/iio/amplifiers/hmc425a.c b/drivers/iio/amplifiers/hmc425a.c
> > index 77872e2dfdfe..50c86c2d28d7 100644
> > --- a/drivers/iio/amplifiers/hmc425a.c
> > +++ b/drivers/iio/amplifiers/hmc425a.c
> > @@ -2,9 +2,10 @@
> > /*
> > * HMC425A and similar Gain Amplifiers
> > *
> > - * Copyright 2020 Analog Devices Inc.
> > + * Copyright 2020, 2024 Analog Devices Inc.
> > */
>
> ...
>
> >
> >
> > +static ssize_t ltc6373_read_powerdown(struct iio_dev *indio_dev,
> > + uintptr_t private,
> > + const struct iio_chan_spec *chan,
> > + char *buf)
> > +{
> > + struct hmc425a_state *st = iio_priv(indio_dev);
> > +
> > + return sysfs_emit(buf, "%d\n", st->powerdown);
>
> Well, in theory the read should also be protected with the lock...
Only reason I can think of for that is potential read tearing.
If that happens on a bool we are going to be in a mess so I think this
is in practice fine without, though paranoia might suggest locking.
It can race against it being powered down but that effectively happens
even if we do have a lock as we either see the value before or after
a racing power down event and we have no way of knowing which.
Applied rest series to iio.git togreg branch and pushed out as testing.
Duitru, if you can figure out what happened to your message thread before
sending more patches that would be great. The IDs for patches 0-5 go
20240220153553.2432-1-mitrutzceclan@gmail.com
20240220153553.2432-3-mitrutzceclan@gmail.com
20240220153553.2432-5-mitrutzceclan@gmail.com
20240220153553.2432-2-mitrutzceclan@gmail.com
20240220153553.2432-4-mitrutzceclan@gmail.com
20240220153553.2432-6-mitrutzceclan@gmail.com
Which really confuses my email client and patchwork.
https://patchwork.kernel.org/project/linux-iio/list/?series=827901
>
> - Nuno Sá
>
next prev parent reply other threads:[~2024-02-24 17:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 15:34 [PATCH v5 0/5] Add support for LTC6373 Dumitru Ceclan
2024-02-20 15:34 ` [PATCH v5 3/5] iio: amplifiers: hmc425a: move conversion logic Dumitru Ceclan
2024-02-21 13:12 ` Nuno Sá
2024-02-24 17:42 ` Jonathan Cameron
2024-02-20 15:34 ` [PATCH v5 1/5] dt-bindings: iio: hmc425a: add conditional GPIO array size constraints Dumitru Ceclan
2024-02-20 15:34 ` [PATCH v5 4/5] iio: amplifiers: hmc425a: use pointers in match table Dumitru Ceclan
2024-02-21 13:17 ` Nuno Sá
2024-02-24 17:44 ` Jonathan Cameron
2024-02-20 15:34 ` [PATCH v5 2/5] dt-bindings: iio: hmc425a: add entry for LTC6373 Dumitru Ceclan
2024-02-20 15:34 ` [PATCH v5 5/5] iio: amplifiers: hmc425a: add support for LTC6373 Instrumentation Amplifier Dumitru Ceclan
2024-02-21 13:23 ` Nuno Sá
2024-02-24 17:54 ` Jonathan Cameron [this message]
2024-02-26 8:25 ` Nuno Sá
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=20240224175448.484ccd10@jic23-huawei \
--to=jic23@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dumitru.ceclan@analog.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mitrutzceclan@gmail.com \
--cc=noname.nuno@gmail.com \
--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