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]
Date: Tue, 2 Apr 2024 13:59:41 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
Cc: "jdelvare@...e.com" <jdelvare@...e.com>,
	"linux-hwmon@...r.kernel.org" <linux-hwmon@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: hwmon: label vs temp%d_label

On Tue, Apr 02, 2024 at 08:24:37PM +0000, Chris Packham wrote:
> Hi Guenter, Jean,
> 
> I've got a requirement to add some meaningful names to some hwmon 
> sensors (LM75 specifically) so that we can provide some indication of 
> where on a board the sensor is located (e.g. "Intake" vs "Exhaust" vs 
> "Near that really hot chip").
> 
> I see that the sysfs ABI documents both "label" for the chip and 
> "temp[1-*]_label" (as well as similar fan and Vin attributes). The 
> latter seem to be supported by the hwmon core but I don't see anything 
> for the former (I'm struggling to find any driver that supports a 
> chip-wide label).
> 
> Assuming I want to have a label added in the device tree to a lm75 would 
> something like the following be acceptable
> 
>        sensor@48 {
>          compatible = "national,lm75";
>          reg = <0x48>;
>          label = "Intake";
>        };
> 
> I'd then update the lm75 driver to grab that from the devicetree and use 
> it to provide the hwmon_temp_label attribute.
> 

Have you tried just declaring the label property as you suggested above
in your system without doing anything else, and looked at the generated
sysfs attributes ?

Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ