From: Guenter Roeck <linux@roeck-us.net>
To: Jon Hunter <jonathanh@nvidia.com>,
Dmitry Osipenko <digetx@gmail.com>,
Jean Delvare <jdelvare@suse.com>
Cc: linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-tegra@vger.kernel.org
Subject: Re: [PATCH v3 2/4] hwmon: (lm90) Use hwmon_notify_event()
Date: Mon, 21 Feb 2022 10:38:38 -0800 [thread overview]
Message-ID: <e776981b-e729-b027-7512-5d5555c2ff74@roeck-us.net> (raw)
In-Reply-To: <6b5e4dfd-ca60-b934-527a-8ccc994047dc@nvidia.com>
On 2/21/22 08:22, Jon Hunter wrote:
>
> On 21/02/2022 16:16, Jon Hunter wrote:
>>
>> On 21/02/2022 16:02, Guenter Roeck wrote:
>>
>> ...
>>
>>>> The platform I see this on does use device-tree and it does have a node for the ti,tmp451 device which uses the lm90 device. This platform uses the device-tree source arch/arm64/boot/dts/nvidia/tegra194-p2972-0000.dts and the tmp451 node is in arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi.
>>>>
>>>
>>> Interesting. It appears that the call to devm_thermal_zone_of_sensor_register()
>>> in the hwmon core nevertheless returns -ENODEV which is not handled properly
>>> in the hwmon core. I can see a number of reasons for this to happen:
>>> - there is no devicetree node for the lm90 device
>>> - there is no thermal-zones devicetree node
>>> - there is no thermal zone entry in the thermal-zones node which matches
>>> the sensor
>>
>>
>> So we definitely have the node for the lm90 device and a thermal-zones node, but I do not see a thermal-sensor node. Maybe this is what we are missing?
>
> Actually, that is not true. We do have thermal-sensor nodes in arch/arm64/boot/dts/nvidia/tegra194.dtsi.
>
There is probably a zone to sensor id mismatch. hwmon sends the sensor index
as sensor_id to the thermal subsystem. Those sensor IDs would be 0, 1, and
possibly 2 for the lm90 driver. Assuming this should match the thermal-sensors
values in arch/arm64/boot/dts/nvidia/tegra194.dtsi, those start with 2,
so there would be a likely mismatch. Also, all those dtsi entries match
against pbmp/thermal, not against the lm90 sensor(s).
Thanks,
Guenter
next prev parent reply other threads:[~2022-02-21 18:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-18 21:54 [PATCH v3 0/4] HWMON LM90 interrupt fixes and improvements Dmitry Osipenko
2021-06-18 21:54 ` [PATCH v3 1/4] hwmon: (lm90) Don't override interrupt trigger type Dmitry Osipenko
2021-06-18 21:54 ` [PATCH v3 2/4] hwmon: (lm90) Use hwmon_notify_event() Dmitry Osipenko
2022-02-21 12:01 ` Jon Hunter
2022-02-21 12:36 ` Dmitry Osipenko
2022-02-21 12:56 ` Jon Hunter
2022-02-21 12:59 ` Dmitry Osipenko
2022-02-21 13:50 ` Jon Hunter
2022-02-21 13:59 ` Dmitry Osipenko
2022-02-21 15:25 ` Guenter Roeck
2022-02-21 15:43 ` Guenter Roeck
2022-02-21 15:49 ` Jon Hunter
2022-02-21 16:02 ` Guenter Roeck
2022-02-21 16:13 ` Dmitry Osipenko
2022-02-21 16:16 ` Jon Hunter
2022-02-21 16:20 ` Dmitry Osipenko
2022-02-21 16:42 ` Guenter Roeck
2022-02-21 16:22 ` Jon Hunter
2022-02-21 18:38 ` Guenter Roeck [this message]
2022-02-21 16:23 ` Guenter Roeck
2021-06-18 21:54 ` [PATCH v3 3/4] hwmon: (lm90) Unmask hardware interrupt Dmitry Osipenko
2021-06-18 21:54 ` [PATCH v3 4/4] hwmon: (lm90) Disable interrupt on suspend Dmitry Osipenko
2021-06-19 11:10 ` [PATCH v3 0/4] HWMON LM90 interrupt fixes and improvements 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=e776981b-e729-b027-7512-5d5555c2ff74@roeck-us.net \
--to=linux@roeck-us.net \
--cc=digetx@gmail.com \
--cc=jdelvare@suse.com \
--cc=jonathanh@nvidia.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®