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: <c70139f8-c0ba-4e28-9477-964db3fbfbba@baylibre.com>
Date: Mon, 14 Oct 2024 17:08:47 -0500
From: David Lechner <dlechner@...libre.com>
To: Andy Shevchenko <andy@...nel.org>,
 Antoniu Miclaus <antoniu.miclaus@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>,
 Michael Hennerich <Michael.Hennerich@...log.com>,
 Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
 <conor+dt@...nel.org>, Nuno Sa <nuno.sa@...log.com>,
 Olivier Moysan <olivier.moysan@...s.st.com>,
 Uwe Kleine-König <ukleinek@...nel.org>,
 Marcelo Schmitt <marcelo.schmitt@...log.com>,
 Ivan Mikhaylov <fr0st61te@...il.com>,
 Marius Cristea <marius.cristea@...rochip.com>,
 Dumitru Ceclan <mitrutzceclan@...il.com>,
 João Paulo Gonçalves <joao.goncalves@...adex.com>,
 Alisa-Dariana Roman <alisadariana@...il.com>,
 Mike Looijmans <mike.looijmans@...ic.nl>,
 AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
 Sergiu Cuciurean <sergiu.cuciurean@...log.com>,
 Dragos Bogdan <dragos.bogdan@...log.com>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-pwm@...r.kernel.org
Subject: Re: [PATCH v3 6/6] iio: adc: ad4851: add ad485x driver

On 10/14/24 8:14 AM, Andy Shevchenko wrote:
> On Mon, Oct 14, 2024 at 12:40:40PM +0300, Antoniu Miclaus wrote:
>> Add support for the AD485X a fully buffered, 8-channel simultaneous
>> sampling, 16/20-bit, 1 MSPS data acquisition system (DAS) with
>> differential, wide common-mode range inputs.
> 

...

>> +	return regmap_update_bits(st->regmap, AD4851_REG_PACKET,
>> +				  AD4851_PACKET_FORMAT_MASK, (osr == 1) ? 0 : 1);
> 
> I would do it with a conditional
> 
> 	if (osr ...)
> 		return regmap_update_bits(st->regmap, AD4851_REG_PACKET,
> 					  AD4851_PACKET_FORMAT_MASK, 0);
> 
> 	return regmap_update_bits(st->regmap, AD4851_REG_PACKET,
> 				  AD4851_PACKET_FORMAT_MASK, 1);
> 
If we do this, regmap_set_bits() and regmap_clear_bits() would
be even better.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ