[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9f5dcb2d-3fa9-4e39-9cf9-c5a23847224a@baylibre.com>
Date: Mon, 19 May 2025 10:51:03 -0500
From: David Lechner <dlechner@...libre.com>
To: Antoniu Miclaus <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
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.
> + return dev_err_probe(dev, -EINVAL,
> + "Invalid 'adi,num-lanes' value: %u",
> + st->num_lanes);
> +
> + return 0;
> +}
> +
Powered by blists - more mailing lists