linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean Delvare <jdelvare@suse.de>
To: Ranran <ranshalit@gmail.com>
Cc: linux@roeck-us.net, linux-hwmon@vger.kernel.org
Subject: Re: How to detect which device is mapped to hwmonX ?
Date: Wed, 12 Dec 2018 11:33:52 +0100	[thread overview]
Message-ID: <20181212113352.6ea13059@endymion> (raw)
In-Reply-To: <CAJ2oMhKE1fQStNKiEUgH3UNhJDVr88A2kDgAUY8QhaSuU=B6Ow@mail.gmail.com>

On Wed, 12 Dec 2018 10:54:19 +0200, Ranran wrote:
> On Tue, Dec 11, 2018 at 11:13 PM Guenter Roeck <linux@roeck-us.net> wrote:
> >
> > On Tue, Dec 11, 2018 at 10:30:58PM +0200, Ranran wrote:  
> > > Hello,
> > >
> > > I have several nodes /sys/class/hwmon/hwmonX ,
> > > but checking the fields I could not find yet a way how to identify a
> > > device (for example i2c address) to the given mapping of hwmonX.
> > >
> > > Is there a way to find out which device is mapped to which hwmonX ?
> > >  
> >
> > Maybe libsensors would work for you ?
> >  
> Thanks , I will check that.
> But I was looking for something to check in /sys or /proc to get the matching.
> Probably if libsensor somehow knows the mapping it also looks there, No ?

libsensors looks in /sys indeed but it's not trivial and libsensors
does not offer an API for it. I remember writing a libsensors-based
name look-up tool years ago. I'm a bit in a hurry but I have copied
what I have at:

http://jdelvare.nerim.net/devel/lm-sensors/patches/

Maybe we can revive the idea if there is a need.

-- 
Jean Delvare
SUSE L3 Support

  reply	other threads:[~2018-12-12 10:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-11 20:30 How to detect which device is mapped to hwmonX ? Ranran
2018-12-11 21:13 ` Guenter Roeck
2018-12-12  8:54   ` Ranran
2018-12-12 10:33     ` Jean Delvare [this message]
2018-12-16  8:57       ` Ranran

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=20181212113352.6ea13059@endymion \
    --to=jdelvare@suse.de \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=ranshalit@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).