[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220110182256.30763-1-paul@crapouillou.net>
Date: Mon, 10 Jan 2022 18:22:54 +0000
From: Paul Cercueil <paul@...pouillou.net>
To: Jean Delvare <jdelvare@...e.com>,
Guenter Roeck <linux@...ck-us.net>,
Jonathan Corbet <corbet@....net>
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org, list@...ndingux.net,
Paul Cercueil <paul@...pouillou.net>
Subject: [PATCH v3 0/2] hwmon: Add "label" attribute v3
Hi Jean, Guenter,
A V3 of my patchset which allows specifying a hwmon device's label from
Device Tree. When the "label" device property is present, its value is
exported to the userspace via the "label" sysfs attribute.
This is useful for userspace to be able to identify an individual device
when multiple individual chips are present in the system.
Note that this mechanism already exists in IIO.
Patch [1/2] documents the ABI change.
Patch [2/2] adds the change to the core drivers/hwmon/hwmon.c file.
Changes from v2:
- Move the code setting the label around in the probe function to fix
error handling issue.
Cheers,
-Paul
Paul Cercueil (2):
ABI: hwmon: Document "label" sysfs attribute
hwmon: Add "label" attribute
Documentation/ABI/testing/sysfs-class-hwmon | 8 +++++
Documentation/hwmon/sysfs-interface.rst | 4 +++
drivers/hwmon/hwmon.c | 34 +++++++++++++++++++--
3 files changed, 43 insertions(+), 3 deletions(-)
--
2.34.1
Powered by blists - more mailing lists