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] [day] [month] [year] [list]
Date:   Thu, 2 Nov 2023 10:17:15 -0700
From:   Guenter Roeck <linux@...ck-us.net>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        "Miclaus, Antoniu" <Antoniu.Miclaus@...log.com>
Cc:     Alessandro Zummo <a.zummo@...ertech.it>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Conor Dooley <conor+dt@...nel.org>,
        Jean Delvare <jdelvare@...e.com>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>
Subject: Re: [PATCH v4 2/2] rtc: max31335: add driver support

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ