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: <a841ebd1-7b28-4a85-95c9-f0c3b9661662@roeck-us.net>
Date: Sun, 26 Jan 2025 11:36:28 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Andrei Lalaev <andrey.lalaev@...il.com>, jdelvare@...e.com,
 conor+dt@...nel.org, robh@...nel.org, krzk@...nel.org,
 christophe.jaillet@...adoo.fr
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org
Subject: Re: [PATCH 1/2] hwmon: add driver for HTU31

On 1/26/25 11:16, Andrei Lalaev wrote:
> On 26.01.2025 15:59, Guenter Roeck wrote:
>> On 1/26/25 06:40, Andrei Lalaev wrote:
>>> Add base support for HTU31 temperature and humidity sensor.
>>>
>>> Besides temperature and humidity values, the driver also exports a 24-bit
>>> serial number and heater control to sysfs.
>>>
>>> Signed-off-by: Andrei Lalaev <andrey.lalaev@...il.com>
>>> ---
>> ...
>>> +
>>> +static struct attribute *htu31_attrs[] = {
>>> +    &dev_attr_heater_enable.attr,
>>> +    &dev_attr_serial_number.attr,
>>
>> I'll accept the heater enable attribute as sysfs attribute,
>> but the serial number is most definitely not a hardware monitoring
>> attribute. Please expose is through debugfs.
> 
> It makes sense. Will be moved to debugfs in v3.
> 

Note that there is now a ->debugfs pointer in struct i2c_client.
You can use that pointer to attach debugfs files, and there is no
need to remove the files in the remove function.

Guenter


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ