[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZddT4mmxf3W55ea8@smile.fi.intel.com>
Date: Thu, 22 Feb 2024 16:02:10 +0200
From: Andy Shevchenko <andy@...nel.org>
To: Dumitru Ceclan <mitrutzceclan@...il.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl, linux-gpio@...r.kernel.org,
Lars-Peter Clausen <lars@...afoo.de>,
Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Michael Walle <michael@...le.cc>, Arnd Bergmann <arnd@...db.de>,
ChiaEn Wu <chiaen_wu@...htek.com>,
Niklas Schnelle <schnelle@...ux.ibm.com>,
Leonard Göhrs <l.goehrs@...gutronix.de>,
Mike Looijmans <mike.looijmans@...ic.nl>,
Haibo Chen <haibo.chen@....com>,
Hugo Villeneuve <hvilleneuve@...onoff.com>,
David Lechner <dlechner@...libre.com>,
Ceclan Dumitru <dumitru.ceclan@...log.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Nuno Sa <nuno.sa@...log.com>
Subject: Re: [PATCH v14 3/3] iio: adc: ad7173: add AD7173 driver
On Thu, Feb 22, 2024 at 01:07:43PM +0200, Dumitru Ceclan wrote:
> The AD7173 family offer a complete integrated Sigma-Delta ADC solution
> which can be used in high precision, low noise single channel
> applications or higher speed multiplexed applications. The Sigma-Delta
> ADC is intended primarily for measurement of signals close to DC but also
> delivers outstanding performance with input bandwidths out to ~10kHz.
A couple more comments which Jonathan might address when applying,
up to him.
..
With
struct device *dev = &st->sd.spi->dev;
the below will be neater.
> + struct ad7173_state *st = iio_priv(indio_dev);
> + u8 buf[AD7173_RESET_LENGTH];
> + unsigned int id;
> + int ret;
..
> + if (id != st->info->id)
> + dev_warn(&st->sd.spi->dev,
> + "Unexpected device id: 0x%04X, expected: 0x%04X\n",
> + id, st->info->id);
(like here)
..
> + st->config_usage_counter = 0;
> + st->config_cnts = devm_kcalloc(&st->sd.spi->dev, st->info->num_configs,
> + sizeof(u64), GFP_KERNEL);
sizeof(*st->config_cnts) ?
(or here)
> + if (!st->config_cnts)
> + return -ENOMEM;
..
> + ret = fwnode_property_match_property_string(dev_fwnode(dev),
device_property_match_property_string()
> + "clock-names",
> + ad7173_clk_sel,
> + ARRAY_SIZE(ad7173_clk_sel));
..
> + if (num_channels == 0)
> + return dev_err_probe(dev, -EINVAL, "No channels specified\n");
-ENODATA?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists