mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Cercueil <paul@crapouillou.net>
To: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Jonathan Corbet <corbet@lwn.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, list@opendingux.net,
	Paul Cercueil <paul@crapouillou.net>
Subject: [PATCH v3 0/2] hwmon: Add "label" attribute v3
Date: Mon, 10 Jan 2022 18:22:54 +0000	[thread overview]
Message-ID: <20220110182256.30763-1-paul@crapouillou.net> (raw)

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


             reply	other threads:[~2022-01-10 18:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-10 18:22 Paul Cercueil [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220110182256.30763-1-paul@crapouillou.net \
    --to=paul@crapouillou.net \
    --cc=corbet@lwn.net \
    --cc=jdelvare@suse.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=list@opendingux.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®