Re: [PATCH v13 3/3] iio: adc: ad7173: add AD7173 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2024-02-20 at 11:43 +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.
> 
> Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx> # for changes up until V12
> Reviewed-by: Michael Walle <michael@xxxxxxxx> # for gpio-regmap
> Signed-off-by: Dumitru Ceclan <mitrutzceclan@xxxxxxxxx>
> ---

Another thing that caught my attention

...

> 
> +static int ad7173_register_clk_provider(struct iio_dev *indio_dev)
> +{
> +	struct ad7173_state *st = iio_priv(indio_dev);
> +	struct device *dev = indio_dev->dev.parent;
> +	struct fwnode_handle *fw_node = dev_fwnode(dev);
> +	struct clk_init_data init = {};
> +	int ret;
> +
> +	if (!fw_node)
> +		return 0;

I think that better than the above check (do we really have any case where fw_node is
NULL?) is to have:

if (!IS_ENABLED(CONFIG_COMMON_CLK))
	return 0;

- Nuno Sá







[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux