Skip to content

Export 1-wire thermal sensors as hwmon device

Jaghathiswari Rankappagounder Natarajan linux-hwmon lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 1 replyIn review
  2. v53 patches 2 repliesSuperseded
  3. v43 patches 2 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v33 patches3 repliesSuperseded
v23 patches6 repliesSuperseded
v13 patches2 repliesSuperseded

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3drivers: w1: add hwmon support structuresdrivers/w1/w1.c include/linux/w1.h+21 -10 replies
2/3drivers: w1: refactor w1_slave_show to make the temp reading functionality separatedrivers/w1/slaves/w1_therm.c+51 -310 replies
3/3drivers: w1: add hwmon temp support for w1_thermdrivers/w1/slaves/w1_therm.c+86 -00 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchEvgeniy PolyakovGuenter Roeck
1/3A-b A-b
2/3A-b A-b
3/3A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH linux v6 0/3] Export 1-wire thermal sensors as hwmon device

Hi Greg,
Please pull in this patchset into the tree. Thanks!

Summary of what this patchset does:

Our board has 4 DS18B20 1-wire temperature sensors. Each 1-wire bus and the sensor under it is already configured against the Linux 1-wire driver (called w1). They have a sysfs file(e.g. /sys/bus/w1/devices/w1_bus_master1/28-000007704f4c/w1_slave) which, when read, runs code to read the temperature. We'd like the temperatures to show up in hwmon, so that the BMC IPMI sensor plumbing can forward those to host.

This patchset is based on top char-misc-next branch(from Greg KH's char-misc git tree).

Tested:
Yes; On a board with 4 DS18B20 1-wire temperature sensors:

root@zaius:/sys/class/hwmon# ls
hwmon0  hwmon1  hwmon2  hwmon3  hwmon4  hwmon5
root@zaius:/sys/class/hwmon# cd hwmon0
root@zaius:/sys/class/hwmon/hwmon0# ls
device       name         subsystem    temp1_input  uevent
root@zaius:/sys/class/hwmon/hwmon0# cat temp1_input
24500
root@zaius:/sys/class/hwmon/hwmon0# cd ..
root@zaius:/sys/class/hwmon# cd hwmon1
root@zaius:/sys/class/hwmon/hwmon1# cat temp1_input
26562
root@zaius:/sys/class/hwmon/hwmon1# cd ..
root@zaius:/sys/class/hwmon# cd hwmon2
root@zaius:/sys/class/hwmon/hwmon2# cat temp1_input
27250
root@zaius:/sys/class/hwmon/hwmon2# cd ..
root@zaius:/sys/class/hwmon# cd hwmon3
root@zaius:/sys/class/hwmon/hwmon3# cat temp1_input
22250
root@zaius:/sys/class/hwmon/hwmon3#

Jaghathiswari Rankappagounder Natarajan (3):
drivers: w1: add hwmon support structures
drivers: w1: refactor w1_slave_show to make the temp reading
functionality separate
drivers: w1: add hwmon temp support for w1_therm

 drivers/w1/slaves/w1_therm.c | 164 +++++++++++++++++++++++++++++++++++--------
 drivers/w1/w1.c              |  18 ++++-
 include/linux/w1.h           |   4 ++
 3 files changed, 156 insertions(+), 30 deletions(-)

--
2.14.1.581.gf28d330327-goog