linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Dahl <post@lespocky.de>
To: linux-kernel@vger.kernel.org
Cc: Jean Delvare <jdelvare@suse.com>,
	Guenter Roeck <linux@roeck-us.net>,
	linux-hwmon@vger.kernel.org, linux-pm@vger.kernel.org
Subject: no hwmon entries in sysfs for thermal on raspberry pi 1b
Date: Fri, 8 Dec 2017 20:53:10 +0100	[thread overview]
Message-ID: <20171208195308.b7mq43ejegmzjlbi@falbala.home.lespocky.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1651 bytes --]

Hei hei,

I have v4.15-rc2 vanilla running on the original Raspberry Pi 1B aka
bcm2835 (not rev2, not the 1B+ or plus), compiled with ptxdist /
DistroKit, using bcm2835-rpi-b.dts from arch/arm/boot/dts as device
tree file. I try to get temperature values from the SoC with
lm-sensors (for using it in some other project). After reading an
issue report on the lm-sensors github project [1] I checked my kernel
config. The following is set:

    CONFIG_HWMON=y
    CONFIG_THERMAL_HWMON=y
    CONFIG_THERMAL=y
    CONFIG_THERMAL_OF=y
    CONFIG_BCM2835_THERMAL=y

There's one thermal zone in sysfs and I get some temperature which I
suppose is the temp of the SoC in m°C:

    root@DistroKit:~ cat /sys/class/thermal/thermal_zone0/temp 
    42236

However, there's nothing below /sys/class/hwmon and I'm wondering why.
There's a thermal zone named 'cpu-thermal' defined and active in DT.

I tried to read some driver code and as far as I understood
thermal_add_hwmon_sysfs() must be called somewhere to get entries for
hwmon in sysfs, and this is done in thermal_zone_device_register(), so
probably a thermal zone must be present somehow, but it seems to be,
at least I can read temp values from it.

What piece am I missing? Is it some kind of configuration I did wrong?

Greets
Alex

[1] https://github.com/groeck/lm-sensors/issues/30

-- 
»With the first link, the chain is forged. The first speech censured, 
the first thought forbidden, the first freedom denied, chains us all 
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: C28E E6B9 0263 95CF 8FAF  08FA 34AD CD00 7221 5CC6 ***

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2017-12-08 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-08 19:53 Alexander Dahl [this message]
2017-12-08 21:01 ` no hwmon entries in sysfs for thermal on raspberry pi 1b 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=20171208195308.b7mq43ejegmzjlbi@falbala.home.lespocky.de \
    --to=post@lespocky.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /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).