From: Joshua Crofts <crofts@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: "Maxime Chevallier" <maxime.chevallier@bootlin.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Matti Vaittinen" <mazziesaccount@gmail.com>,
"Rodolfo Giometti" <giometti@enneenne.com>,
"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Angelo Dureghello" <adureghello@baylibre.com>,
"Tobias Sperling" <tobias.sperling@softing.com>,
"Eason Yang" <j2anfernee@gmail.com>,
"Marilene Andrade Garcia" <marilene.agarcia@gmail.com>,
"Cosmin Tanislav" <cosmin-gabriel.tanislav.xa@renesas.com>,
duje@dujemihanovic.xyz, herve.codina@bootlin.com,
thomas.petazzoni@bootlin.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] iio: adc: add driver for Texas Instruments TLA2528 adc
Date: Wed, 4 Nov 2026 16:45:23 +0100 [thread overview]
Message-ID: <20261104164523.00002cba@kernel.org> (raw)
In-Reply-To: <autSKpnh0hORsYT4@ashevche-desk.local>
On Wed, 4 Nov 2026 17:41:30 +0200
Andy Shevchenko <andriy.shevchenko@intel.com> wrote:
> On Wed, Nov 04, 2026 at 02:56:41PM +0100, Joshua Crofts wrote:
> > On Wed, 4 Nov 2026 13:57:25 +0100
> > Maxime Chevallier <maxime.chevallier@bootlin.com> wrote:
>
> ...
>
> > > +#include <linux/types.h>
> > > +#include <linux/units.h>
> > > +
> > > +#include <linux/iio/adc-helpers.h>
> > > +#include <linux/iio/iio.h>
> >
> > + #include <asm/byteorder.h> for be16_to_cpu()
>
> Yep, but please before linux/iio/* block.
>
> ...
>
> > > +static int tla2528_read(struct tla2528 *tla2528, u8 channel, int *val)
> > > +{
> > > + __be16 data;
> > > + int ret;
> > > +
> > > + guard(mutex)(&tla2528->lock);
> > > +
> > > + ret = regmap_update_bits(tla2528->regmap, TLA2528_CHANNEL_SEL_ADR,
> > > + TLA2528_CHANNEL_SEL_MANUAL_CHID, channel);
> > > + if (ret)
> > > + return ret;
> > > +
> > > + ret = i2c_master_recv(tla2528->client, (char *)&data, sizeof(data));
> > > + if (ret < 0)
> > > + return ret;
> >
> > As rare as short reads may be, perhaps add a check whether the expected amount
> > of bits have been returned from the device?
>
> Bits? You probably mistyped bytes?
Ugh yes, I was in between meetings and rushed my reply. Thanks for catching
this!
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-11-04 15:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 12:57 [PATCH v3 0/2] iio: adc: add driver for Texas Instruments TLA2528 adc Maxime Chevallier
2026-11-04 12:57 ` [PATCH v3 1/2] dt-bindings: iio: adc: add Texas Instruments TLA2528 Maxime Chevallier
2026-11-04 13:58 ` Joshua Crofts
2026-11-04 12:57 ` [PATCH v3 2/2] iio: adc: add driver for Texas Instruments TLA2528 adc Maxime Chevallier
2026-11-04 13:05 ` sashiko-bot
2026-11-04 13:56 ` Joshua Crofts
2026-11-04 15:41 ` Andy Shevchenko
2026-11-04 15:45 ` Joshua Crofts [this message]
2026-11-04 18:06 ` Maxime Chevallier
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=20261104164523.00002cba@kernel.org \
--to=crofts@kernel.org \
--cc=adureghello@baylibre.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=cosmin-gabriel.tanislav.xa@renesas.com \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=duje@dujemihanovic.xyz \
--cc=giometti@enneenne.com \
--cc=herve.codina@bootlin.com \
--cc=j2anfernee@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=marilene.agarcia@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mazziesaccount@gmail.com \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tobias.sperling@softing.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.