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: <078ee3c4-bb55-479b-85ff-3cab5f9a9eff@gmail.com>
Date: Thu, 3 Apr 2025 08:18:52 +0300
From: Matti Vaittinen <mazziesaccount@...il.com>
To: David Lechner <dlechner@...libre.com>,
 Matti Vaittinen <matti.vaittinen@...rohmeurope.com>
Cc: Jonathan Cameron <jic23@...nel.org>, Lars-Peter Clausen
 <lars@...afoo.de>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Nuno Sa <nuno.sa@...log.com>,
 Javier Carrasco <javier.carrasco.cruz@...il.com>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2 7/7] iio: ti-adc128s052: Drop variable vref

On 02/04/2025 23:49, David Lechner wrote:
> On 4/2/25 1:10 AM, Matti Vaittinen wrote:
>> According to Jonathan, variable reference voltages are very rare. It is
>> unlikely it is needed, and supporting it makes the code a bit more
>> complex.
> 
> There is also around 60 other drivers where we could do something like this
> in case anyone is bored. :-p
> 
>>
>> Simplify the driver and drop the variable vref support.
>>
>> Suggested-by: Jonathan Cameron <jic23@...nel.org>
>> Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
>> ---
>> Revision History:
>>   v2:
>>    - New patch
>> ---
>>   drivers/iio/adc/ti-adc128s052.c | 29 ++++++-----------------------
>>   1 file changed, 6 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c
>> index 0f93c6266527..0bfe4e558c69 100644
>> --- a/drivers/iio/adc/ti-adc128s052.c
>> +++ b/drivers/iio/adc/ti-adc128s052.c
>> @@ -29,13 +29,12 @@ struct adc128_configuration {
>>   struct adc128 {
>>   	struct spi_device *spi;
>>   
>> -	struct regulator *reg;
>>   	/*
>>   	 * Serialize the SPI 'write-channel + read data' accesses and protect
>>   	 * the shared buffer.
>>   	 */
>>   	struct mutex lock;
>> -
>> +	int vref;
> 
> Units in the name are helpful: vref_uv.
> 
> Could also consider doing division in probe and storing vref_mv instead
> since we never use the microvolts part.

Ah, thanks for the suggestions. I agree with both.

> 
>>   	union {
>>   		__be16 rx_buffer;
>>   		u8 tx_buffer[2];
> 

Yours,
	-- Matti


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ