Re: [PATCH v4 2/2] iio: adc: ad7173: add AD7173 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/20/23 18:21, Andy Shevchenko wrote:> On Mon, Nov 20, 2023 at
05:55:12PM +0200, Ceclan Dumitru wrote:
>> On 11/20/23 15:00, Andy Shevchenko wrote:
>>> On Thu, Nov 16, 2023 at 03:46:55PM +0200, mitrutzceclan wrote:

> 
> Use struct_group() to show explicitly the group of members. If it's not an ABI in any sense, then memcmp() is fine.
> 

Alright

>>>> +	return vref / (MICRO/MILLI);
>>>
>>> What does the denominator mean and why you can't simply use MILL?
>>
>> Original vref values are in micro, I considered that it was adequate 
>> to represent the conversion from MICRO to MILLI as a fraction.
>>
>>>> +		*val = st->info->sinc5_data_rates[reg] / (MICRO/MILLI);
>>>> +		*val2 = (st->info->sinc5_data_rates[reg] % MILLI) * 
>>>> +(MICRO/MILLI);
>>>
>>> Same Q about denominator.
>>>
>> Here, a misunderstanding on my part of a suggestion from Jonathan in 
>> V2, will be removed.
> 
> You need to clarify with him that.
> 
My misunderstanding was that he only referred to the multiplication, not
the denominator. *val has a conversion from MILLI to no metric prefix
while *val2 converts from MILLI to MICRO.




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux