Skip to content

hwmon: (sht3x) read out sensor serial number

Stefan Gloor linux-doc linux-hwmon lkml 3 versions – Applied

Status from this message: Applied.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest1 patch 1 replyApplied
  2. v31 patch 3 repliesSuperseded
  3. v11 patch 3 repliesSuperseded

Changes in v4 from the cover letter

- Remove debugfs entry with devm_add_action_or_reset()

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/1hwmon: (sht3x) read out sensor serial numberDocumentation/hwmon/sht3x.rst drivers/hwmon/sht3x.c+76 -11 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/1] hwmon: (sht3x) read out sensor serial number

The temperature/humidity sensors of the STS3x/SHT3x family are calibrated and factory-programmed with a unique serial number. For some sensors, this serial number can be used to obtain a calibration certificate via an API provided by the manufacturer (Sensirion). Expose the serial number via debugfs.

A "sht3x" debugfs directory is created when loading the driver. Within this parent directory, another directory is created for each sensor instantiation which contains the serial number.
The sensor-specific directories are managed by devres, such that they are cleaned up upon deinstantation or if hwmon registration fails. The top-level directory is removed when the driver is unloaded.

Changelog
=========

v3 -> v4:
- Remove debugfs entry with devm_add_action_or_reset()

v2 -> v3:
- Remove #ifdef for debugfs
- Add debugfs cleanup
- Do not expose serial number if read fails

v1 -> v2:
- Change from sysfs to debugfs
- Add documentation improvements

Stefan Gloor (1):
hwmon: (sht3x) read out sensor serial number

 Documentation/hwmon/sht3x.rst | 11 ++++++
 drivers/hwmon/sht3x.c         | 66 ++++++++++++++++++++++++++++++++++-
 2 files changed, 76 insertions(+), 1 deletion(-)
Signature · 1 line
2.41.0