lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZkNjYZew7Mko7iPX@smile.fi.intel.com>
Date: Tue, 14 May 2024 16:13:05 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Alisa-Dariana Roman <alisadariana@...il.com>
Cc: michael.hennerich@...log.com, linux-iio@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	lars@...afoo.de, jic23@...nel.org, robh@...nel.org,
	krzysztof.kozlowski+dt@...aro.org, conor+dt@...nel.org,
	lgirdwood@...il.com, broonie@...nel.org, nuno.sa@...log.com,
	marcelo.schmitt@...log.com, bigunclemax@...il.com,
	dlechner@...libre.com, okan.sahin@...log.com, fr0st61te@...il.com,
	alisa.roman@...log.com, marcus.folkesson@...il.com,
	schnelle@...ux.ibm.com, liambeguin@...il.com
Subject: Re: [PATCH v8 3/6] iio: adc: ad7192: Add aincom supply

On Tue, May 14, 2024 at 03:02:19PM +0300, Alisa-Dariana Roman wrote:
> AINCOM should actually be a supply. AINx inputs are referenced to AINCOM
> in pseudo-differential operation mode. AINCOM voltage represents the
> offset of corresponding channels.

..

Possible cleanup with the help of

	struct device *dev = &spi->dev;


>  	struct ad7192_state *st;
>  	struct iio_dev *indio_dev;
> +	struct regulator *aincom;
>  	int ret;

..

> +	aincom = devm_regulator_get_optional(&spi->dev, "aincom");

	aincom = devm_regulator_get_optional(dev, "aincom");

..

> +			return dev_err_probe(&spi->dev, PTR_ERR(aincom),
> +					     "Failed to get AINCOM supply\n");

			return dev_err_probe(dev, PTR_ERR(aincom),
					     "Failed to get AINCOM supply\n");

..

> +			return dev_err_probe(&spi->dev, ret,
> +					     "Failed to enable specified AINCOM supply\n");

			return dev_err_probe(dev, ret,
					     "Failed to enable specified AINCOM supply\n");

..

> +		ret = devm_add_action_or_reset(&spi->dev, ad7192_reg_disable, aincom);

		ret = devm_add_action_or_reset(dev, ad7192_reg_disable, aincom);

..

> +			return dev_err_probe(&spi->dev, ret,
> +					     "Device tree error, AINCOM voltage undefined\n");

			return dev_err_probe(dev, ret,
					     "Device tree error, AINCOM voltage undefined\n");

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ