lkml.org 
[lkml]   [2023]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 2/2] rtc: max31335: add driver support
From
On 11/2/23 09:57, Alexandre Belloni wrote:
[ ... ]
>>>> +static int max31335_read_offset(struct device *dev, long *offset)
>>>> +{
>>>> + struct max31335_data *max31335 = dev_get_drvdata(dev);
>>>> + u32 value;
>>>> + int ret;
>>>> +
>>>> + ret = regmap_read(max31335->regmap, MAX31335_AGING_OFFSET,
>>> &value);
>>>> + if (ret)
>>>> + return ret;
>>>> +
>>>> + *offset = value;
>>>
>>> This is super dubious, what is the unit of MAX31335_AGING_OFFSET ?
>>>
>>
>> There is not additional information on the AGING_OFFSET register (no
>> other offset registers).
>> I treated it as a raw value that user can write/read. Should I drop the
>> offset implementation?
>>
>
> The value exposed to userspace is in parts per billion. If you can't do
> the conversion, then you have to drop it.
>

The max31334 datasheet says "Resolution = 0.477ppm". Again, the datasheet for
max31335 is not public, so it is impossible to say what the resolution is
for that chip, but I would assume that it is documented.

Guenter

\
 
 \ /
  Last update: 2023-11-02 18:18    [W:0.099 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site