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: <917bc1d9-fbdc-4ca2-a156-813b57c8201e@gmail.com>
Date: Wed, 29 May 2024 17:03:27 +0300
From: "Ceclan, Dumitru" <mitrutzceclan@...il.com>
To: Nuno Sá <noname.nuno@...il.com>,
 dumitru.ceclan@...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 <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>, David Lechner <dlechner@...libre.com>,
 linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 5/6] iio: adc: ad7173: Add support for AD411x devices

On 29/05/2024 15:46, Nuno Sá wrote:
> On Mon, 2024-05-27 at 20:02 +0300, Dumitru Ceclan via B4 Relay wrote:
>> From: Dumitru Ceclan <dumitru.ceclan@...log.com>

..

>>  static const struct ad7173_device_info ad7173_device_info[] = {
>> +	[ID_AD4111] = {
>> +		.name = "ad4111",
>> +		.id = AD7173_AD4111_AD4112_AD4114_ID,
>> +		.num_voltage_inputs_with_divider = 8,
>> +		.num_channels = 16,
>> +		.num_configs = 8,
>> +		.num_voltage_inputs = 8,
>> +		.num_gpios = 2,
>> +		.higher_gpio_bits = true,
>> +		.has_temp = true,
>> +		.has_vcom_input = true,
>> +		.has_input_buf = true,
>> +		.has_current_inputs = true,
>> +		.has_int_ref = true,
>> +		.clock = 2 * HZ_PER_MHZ,
>> +		.sinc5_data_rates = ad7173_sinc5_data_rates,
>> +		.num_sinc5_data_rates = ARRAY_SIZE(ad7173_sinc5_data_rates),
>> +	},
> 
> At some point it would be nice to drop the ad7173_device_info array...
> 
What are good alternatives to this?
..

>> +		ret = fwnode_property_match_property_string(child,
>> +							    "adi,channel-type",
>> +							    ad7173_channel_types,
>> +							   
>> ARRAY_SIZE(ad7173_channel_types));
>> +		chan->differential = (ret < 0 || ret == AD7173_CHAN_DIFFERENTIAL)
>> +					? 1 : 0;
> 
> I don't think we should treat 'ret < 0' has a differential channel. Any reason for
> it? For me, it's just an invalid property value given by the user...
> 
Yes, as that would be the default value if it's missing or invalid

> - Nuno Sá
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ