All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lei YU <mine260309@gmail.com>
To: Hardware Monitoring <linux-hwmon@vger.kernel.org>,
	OpenBMC Maillist <openbmc@lists.ozlabs.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Subject: Userspace matching of hwmon devices to hardware
Date: Mon, 25 Mar 2019 16:21:42 +0800	[thread overview]
Message-ID: <CAARXrtmNL+Px7vk4mA++yzO22nUWqmBnL3hn6oedB8d9516pvg@mail.gmail.com> (raw)

This email is to ask/discuss if there is a stable path/name (or whatever) for
hwmon devices in the different versions of kernels.

In OpenBMC, the service phosphor-hwmon reads the sensors' value and expose to
DBus, depending on a configure file that matches the device tree path.

The service is started by udev rule, called with the DEVPATH and OF_FULLNAME,
so it knows where to find the configure file depending on DEVPATH or
OF_FULLNAME.

E.g. on Romulus BMC, the w83773 sensor has OF_FULLNAME at
   /ahb/apb/i2c@1e78a000/i2c-bus@440/w83773g@4c,
and the service knows the config is matched from path
   /etc/default/obmc/hwmon/ahb/apb/i2c@1e78a000/i2c-bus@440/w83773g@4c.conf

However, the DEVPATH or OF_FULLNAME is not stable in different kernels:
* In 4.1x kernel, the path is as above.
* In 5.0 kernel, "i2c@1e78a000" is changed to "bus@1e78a000" in the path.

This breaks the userspace's phosphor-hwmon.
If we fix the issue by updating the configure files' path in userspace, it
means the userspace only with the new 5.x kernel.

So the question here is, it there a stable way for userspace to match a hwmon
device?

Thanks!

--
BRs,
Lei YU

             reply	other threads:[~2019-03-25  8:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25  8:21 Lei YU [this message]
2019-03-25  8:21 ` Userspace matching of hwmon devices to hardware Lei YU
2019-03-25 10:43 ` 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=CAARXrtmNL+Px7vk4mA++yzO22nUWqmBnL3hn6oedB8d9516pvg@mail.gmail.com \
    --to=mine260309@gmail.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=openbmc@lists.ozlabs.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.