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

Hi Jean, Guenter,

A V2 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 v1:
- The label is cached into the hwmon_device structure
- hwmon_dev_name_is_visible() renamed to hwmon_dev_attr_is_visible()
- Add missing <linux/property.h> include
- The DT binding documentation of the "label" property has been dropped,
  and the "label" property is now supported directly in dtschema.

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] 7+ messages in thread

end of thread, other threads:[~2022-01-10 10:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-05 15:15 [PATCH v2 0/2] hwmon: Add "label" attribute v2 Paul Cercueil
2022-01-05 15:15 ` [PATCH v2 1/2] ABI: hwmon: Document "label" sysfs attribute Paul Cercueil
2022-01-05 15:15 ` [PATCH v2 2/2] hwmon: Add "label" attribute Paul Cercueil
2022-01-05 22:27   ` kernel test robot
2022-01-10  1:29   ` Guenter Roeck
2022-01-10 10:48     ` Paul Cercueil
2022-01-10  6:44   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).