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] [day] [month] [year] [list]
Message-ID: <9ed23409-f402-4d08-ad59-af8ac48d88d2@baylibre.com>
Date: Fri, 30 May 2025 08:49:07 -0500
From: David Lechner <dlechner@...libre.com>
To: Angelo Dureghello <adureghello@...libre.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
 Michael Hennerich <Michael.Hennerich@...log.com>,
 Jonathan Cameron <jic23@...nel.org>, Nuno Sá
 <nuno.sa@...log.com>, Andy Shevchenko <andy@...nel.org>,
 linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] iio: adc: ad7606: add enabling of optional Vrefin
 voltage

On 5/30/25 2:39 AM, Angelo Dureghello wrote:
> On 29.05.2025 12:52, David Lechner wrote:
>> On 5/29/25 4:13 AM, Angelo Dureghello wrote:
>>> From: Angelo Dureghello <adureghello@...libre.com>
>>>
>>> Add optional refin voltage enabling. The property "refin-supply" is
>>> already available and optional in the current fdt dt_schema.
>>>
>>> Signed-off-by: Angelo Dureghello <adureghello@...libre.com>
>>> ---
>>>  drivers/iio/adc/ad7606.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/iio/adc/ad7606.c b/drivers/iio/adc/ad7606.c
>>> index 3bbe9c05b5edbc11e8016c995c6ab64104836e7b..21e63260965c32988d0ab3b8bb1201aa2396f1ba 100644
>>> --- a/drivers/iio/adc/ad7606.c
>>> +++ b/drivers/iio/adc/ad7606.c
>>> @@ -1335,6 +1335,10 @@ int ad7606_probe(struct device *dev, int irq, void __iomem *base_address,
>>>  		return dev_err_probe(dev, ret,
>>>  				     "Failed to enable Vdrive supply\n");
>>>  
>>> +	ret = devm_regulator_get_enable_optional(dev, "refin");
>>> +	if (ret < 0 && ret != -ENODEV)
>>
>> < 0 is probably not needed.
>>
> The above code looks correct to me. What is the issue ?

Like Nuno said, it can't be > 0, so if (ret && ret != -ENODEV)

>  
>>> +		return dev_err_probe(dev, ret, "failed to get refin voltage\n");
>>
>> We aren't reading the voltage, so the message doesn't make sense.
>>
> Is it better a 
> "failed to get refin-supply\n" or
> "failed to enable refin voltage\n"

I would make the message the same as Vdrive.

 "Failed to enable REFIN supply\n");

> 
> ?
> 
>>> +
>>>  	st->chip_info = chip_info;
>>>  
>>>  	if (st->chip_info->oversampling_num) {
>>>
>>
> Regards,
> angelo


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ