From: "Nuno Sá" <noname.nuno@gmail.com>
To: David Lechner <dlechner@baylibre.com>,
Antoniu Miclaus <antoniu.miclaus@analog.com>,
jic23@kernel.org, robh@kernel.org, conor+dt@kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 09/10] iio: adc: ad4080: add driver support
Date: Tue, 20 May 2025 10:24:16 +0100 [thread overview]
Message-ID: <e9799164b92a5b2c270cd9a9d2af7eddd7ede83d.camel@gmail.com> (raw)
In-Reply-To: <9f5dcb2d-3fa9-4e39-9cf9-c5a23847224a@baylibre.com>
On Mon, 2025-05-19 at 10:51 -0500, David Lechner wrote:
> On 5/16/25 3:26 AM, Antoniu Miclaus wrote:
> > Add support for AD4080 high-speed, low noise, low distortion,
> > 20-bit, Easy Drive, successive approximation register (SAR)
> > analog-to-digital converter (ADC).
> >
> > Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
> > ---
>
>
> ...
>
> > +static int ad4080_properties_parse(struct ad4080_state *st)
> > +{
> > + struct device *dev = regmap_get_device(st->regmap);
> > +
> > + st->lvds_cnv_en = device_property_read_bool(dev, "adi,lvds-cnv-
> > enable");
> > +
> > + st->num_lanes = 1;
> > + device_property_read_u32(dev, "adi,num-lanes", &st->num_lanes);
> > + if (!st->num_lanes)
>
> Error checking seems not strict enough. Allowed values are only 1 and 2.
I also find it more readable to check the return value and only validate when
needed. But this is pretty much a nit and personal taste.
Regarding your point, agree that the check should be better. Maybe Jonathan can
tweak or Antoniu can follow up on this?
- Nuno Sá
>
> > + return dev_err_probe(dev, -EINVAL,
> > + "Invalid 'adi,num-lanes' value: %u",
> > + st->num_lanes);
> > +
> > + return 0;
> > +}
> > +
next prev parent reply other threads:[~2025-05-20 9:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-16 8:26 [PATCH v6 00/10] Add support for AD4080 ADC Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 01/10] iio: backend: add support for filter config Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 02/10] iio: backend: add support for data alignment Antoniu Miclaus
2025-05-18 17:08 ` Jonathan Cameron
2025-05-16 8:26 ` [PATCH v6 03/10] iio: backend: add support for number of lanes Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 04/10] dt-bindings: iio: adc: add ad408x axi variant Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 05/10] iio: adc: adi-axi-adc: add filter type config Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 06/10] iio: adc: adi-axi-adc: add data align process Antoniu Miclaus
2025-05-18 17:18 ` Jonathan Cameron
2025-05-16 8:26 ` [PATCH v6 07/10] iio: adc: adi-axi-adc: add num lanes support Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 08/10] dt-bindings: iio: adc: add ad4080 Antoniu Miclaus
2025-05-16 8:26 ` [PATCH v6 09/10] iio: adc: ad4080: add driver support Antoniu Miclaus
2025-05-18 17:14 ` Jonathan Cameron
2025-05-19 15:51 ` David Lechner
2025-05-20 9:24 ` Nuno Sá [this message]
2025-05-20 10:31 ` Miclaus, Antoniu
2025-05-16 8:26 ` [PATCH v6 10/10] Documetation: ABI: add sinc1 and sinc5+pf1 filter Antoniu Miclaus
2025-05-18 17:21 ` Jonathan Cameron
2025-05-18 17:23 ` [PATCH v6 00/10] Add support for AD4080 ADC 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=e9799164b92a5b2c270cd9a9d2af7eddd7ede83d.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@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).