All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] hwmon: Add "label" attribute v3
@ 2022-01-10 18:22 Paul Cercueil
  2022-01-10 18:22 ` [PATCH v3 1/2] ABI: hwmon: Document "label" sysfs attribute Paul Cercueil
  2022-01-10 18:22 ` [PATCH v3 2/2] hwmon: Add "label" attribute Paul Cercueil
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Cercueil @ 2022-01-10 18:22 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, Jonathan Corbet
  Cc: linux-hwmon, linux-kernel, linux-doc, list, Paul Cercueil

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-14 16:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-10 18:22 [PATCH v3 0/2] hwmon: Add "label" attribute v3 Paul Cercueil
2022-01-10 18:22 ` [PATCH v3 1/2] ABI: hwmon: Document "label" sysfs attribute Paul Cercueil
2022-01-14 16:41   ` Guenter Roeck
2022-01-10 18:22 ` [PATCH v3 2/2] hwmon: Add "label" attribute Paul Cercueil
2022-01-14 16:41   ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.