From: Guenter Roeck <linux@roeck-us.net>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>,
"Miclaus, Antoniu" <Antoniu.Miclaus@analog.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Jean Delvare <jdelvare@suse.com>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hwmon@vger.kernel.org" <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] rtc: max31335: add driver support
Date: Thu, 2 Nov 2023 10:17:15 -0700 [thread overview]
Message-ID: <e743bcaa-f17c-4a0f-bcb2-b38d02e802cb@roeck-us.net> (raw)
In-Reply-To: <20231102165713296ca50b@mail.local>
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
next prev parent reply other threads:[~2023-11-02 17:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 9:48 [PATCH v4 1/2] dt-bindings: rtc: max31335: add max31335 bindings Antoniu Miclaus
2023-11-01 9:48 ` [PATCH v4 2/2] rtc: max31335: add driver support Antoniu Miclaus
2023-11-01 14:21 ` Guenter Roeck
2023-11-01 15:21 ` Miclaus, Antoniu
2023-11-01 15:30 ` Guenter Roeck
2023-11-01 22:23 ` Alexandre Belloni
2023-11-02 13:44 ` Miclaus, Antoniu
2023-11-02 16:57 ` Alexandre Belloni
2023-11-02 17:17 ` Guenter Roeck [this message]
2023-11-01 15:11 ` [PATCH v4 1/2] dt-bindings: rtc: max31335: add max31335 bindings Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e743bcaa-f17c-4a0f-bcb2-b38d02e802cb@roeck-us.net \
--to=linux@roeck-us.net \
--cc=Antoniu.Miclaus@analog.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).