Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1686060

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

From Jaghathiswari Rankappagounder Natarajan <jaghu@google.com>
Newsgroups linux.kernel
Subject [PATCH linux v2 0/3] Export 1-wire thermal sensors as hwmon device
Date 2017-07-12 23:50 +0200
Message-ID <u2xGa-59T-15@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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.

The changes in version 2 are mentioned in the individual patches.

This patchset is based on linux mainline version v4.10.

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 | 197 ++++++++++++++++++++++++++++++++++++-------
 drivers/w1/w1.c              |  21 ++++-
 drivers/w1/w1.h              |   2 +
 drivers/w1/w1_family.h       |   2 +
 4 files changed, 191 insertions(+), 31 deletions(-)

--
2.13.2.932.g7449e964c-goog

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH linux v2 0/3] Export 1-wire thermal sensors as hwmon device Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> - 2017-07-12 23:50 +0200
  [PATCH linux v2 3/3] drivers: w1: add hwmon temp support for w1_therm Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> - 2017-07-12 23:50 +0200
    Re: [linux,v2,3/3] drivers: w1: add hwmon temp support for w1_therm Guenter Roeck <linux@roeck-us.net> - 2017-07-13 17:20 +0200
  [PATCH linux v2 2/3] drivers: w1: refactor w1_slave_show to make the temp reading functionality separate Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> - 2017-07-12 23:50 +0200
  Re: [PATCH linux v2 0/3] Export 1-wire thermal sensors as hwmon device Evgeniy Polyakov <zbr@ioremap.net> - 2017-07-13 17:40 +0200
    Re: [PATCH linux v2 0/3] Export 1-wire thermal sensors as hwmon device Evgeniy Polyakov <zbr@ioremap.net> - 2017-07-13 17:40 +0200
      Re: [PATCH linux v2 0/3] Export 1-wire thermal sensors as hwmon device Jaghathiswari Rankappagounder Natarajan <jaghu@google.com> - 2017-07-17 18:10 +0200
        Re: [PATCH linux v2 0/3] Export 1-wire thermal sensors as hwmon  device Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-17 18:30 +0200

csiph-web