[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<CY4PR03MB3399602CDA166ECCA7D36ED19B9FA@CY4PR03MB3399.namprd03.prod.outlook.com>
Date: Tue, 20 May 2025 10:31:59 +0000
From: "Miclaus, Antoniu" <Antoniu.Miclaus@...log.com>
To: David Lechner <dlechner@...libre.com>,
"jic23@...nel.org"
<jic23@...nel.org>,
"robh@...nel.org" <robh@...nel.org>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"linux-iio@...r.kernel.org"
<linux-iio@...r.kernel.org>,
"devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v6 09/10] iio: adc: ad4080: add driver support
> -----Original Message-----
> From: David Lechner <dlechner@...libre.com>
> Sent: Monday, May 19, 2025 6:51 PM
> To: Miclaus, Antoniu <Antoniu.Miclaus@...log.com>; jic23@...nel.org;
> robh@...nel.org; conor+dt@...nel.org; linux-iio@...r.kernel.org;
> devicetree@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v6 09/10] iio: adc: ad4080: add driver support
>
> [External]
>
> 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@...log.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.
>
Since this was already applied, I will add a follow-up patch on this topic.
> > + return dev_err_probe(dev, -EINVAL,
> > + "Invalid 'adi,num-lanes' value: %u",
> > + st->num_lanes);
> > +
> > + return 0;
> > +}
> > +
Powered by blists - more mailing lists