From: Guenter Roeck <linux@roeck-us.net>
To: "Stéphan Kochen" <stephan@kochen.nl>
Cc: Jean Delvare <jdelvare@suse.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
lm-sensors@lm-sensors.org, devicetree@vger.kernel.org,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>
Subject: Re: [PATCH 2/3] lm90: initialize parameters from devicetree
Date: Fri, 22 Jan 2016 18:53:50 -0800 [thread overview]
Message-ID: <56A2EB3E.4080002@roeck-us.net> (raw)
In-Reply-To: <20160122223238.GB21534@Stephans-iMac.lan>
On 01/22/2016 02:32 PM, Stéphan Kochen wrote:
> On Fri, Jan 22, 2016 at 06:53:44AM -0800, Guenter Roeck wrote:
>> On 01/21/2016 11:34 AM, Stéphan Kochen wrote:
>>> Allow a device tree to set initial temperature sensor parameters.
>>
>> This very much smells like configuration, not hardware description.
>>
>> Having said that, the thermal subsystem does something similar. This raises even more
>> questions, though. Since patch 3 of the series introduces registration with the thermal
>> subsystem, it seems to me that the thermal subsystem should provide any limits used
>> to program the chips, and that there should be a mechanism for the thermal subsystem
>> to interact with the driver to both set the limits and to be informed if a limit
>> is exceeded.
>>
>> Also, _if_ such a set of properties is introduced and accepted by the devicetree
>> reviewers, it should probably be a set of properties which applies to _all_ hardware
>> monitoring drivers, not just to one. Even if support is not implemented immediately
>> in the hwmon core, the properties should be usable in a generic way, and not
>> reflect sysfs attribute names used by the hwmon subsystem.
>
> The original kernel for Ouya is a 3.1 kernel from nVidia's old
> Linux4Tegra branches. This kernel had its own Tegra-specific thermal
> zone support which seems to do more or less that: the thermal zone
> system actually uses the sensor alert interrupts to detect when it needs
> to act, and reconfigures alert bounds as the temperature slides to
> another range it wants to monitor.
>
> Thermal zones in current master only have the ability to check sensor
> values at an interval.
>
> I'd agree that update-interval and the low/high bounds could be
> controlled by the thermal zone system. I'm less certain what to do with
> the critical/emergency bounds, and the remote-offset.
>
> Thing about Ouya is that, even with the thermal zone currently working,
> the alert bounds set when the system comes up seem to be crippling the
> system with interrupts shortly after the sensor is activated. So they
> have to be set to something sane. Hence why I added both.
>
> I'm not sure if you're expecting me to do the work of extending thermal
> zones. I guess I'd need to figure out how a sensor would notify a
> thermal zone of an alert, and implement that functionality while staying
> backwards compatible.
>
The thermal subsystem supports setting trip points, which I would think
is what you are looking for here. Question is if an how you can use the
information from the thermal subsystem (and thus the thermal zone configuration)
to set the various limits in the lm90 driver. This should hopefully be sufficient
to fix your immediate problem. For handling alerts, I guess we'll have to wait for
thermal subsystem improvements (unless of course you volunteer to do that work.
Copying the the linux-pm mailing list and thermal maintainers for additional advise.
Thanks,
Guenter
next prev parent reply other threads:[~2016-01-23 2:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 19:34 [PATCH 0/3] lm90: device tree and thermal zone support Stéphan Kochen
[not found] ` <1453404877-17897-1-git-send-email-stephan-j6uo2F6POYhmR6Xm/wNWPw@public.gmane.org>
2016-01-21 19:34 ` [PATCH 1/3] lm90: separate register accessors from sysfs Stéphan Kochen
[not found] ` <1453404877-17897-2-git-send-email-stephan-j6uo2F6POYhmR6Xm/wNWPw@public.gmane.org>
2016-01-22 14:42 ` [lm-sensors] " Guenter Roeck
2016-01-22 14:42 ` Guenter Roeck
[not found] ` <56A23FD2.9040009-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-01-22 22:00 ` [lm-sensors] " Stéphan Kochen
2016-01-22 22:00 ` Stéphan Kochen
[not found] ` <20160122220056.GA21534-3Ql6wuUqVi7fKcxHm0zdRv8+0UxHXcjY@public.gmane.org>
2016-01-25 9:41 ` [lm-sensors] " Jean Delvare
2016-01-21 19:34 ` [PATCH 2/3] lm90: initialize parameters from devicetree Stéphan Kochen
[not found] ` <1453404877-17897-3-git-send-email-stephan-j6uo2F6POYhmR6Xm/wNWPw@public.gmane.org>
2016-01-22 14:53 ` [lm-sensors] " Guenter Roeck
2016-01-22 14:53 ` Guenter Roeck
[not found] ` <56A24278.8050909-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-01-22 22:32 ` [lm-sensors] " Stéphan Kochen
2016-01-22 22:32 ` Stéphan Kochen
2016-01-23 2:53 ` Guenter Roeck [this message]
[not found] ` <56A2EB3E.4080002-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2016-01-27 21:18 ` Interrupt driven thermal OF sensors (was: [PATCH 2/3] lm90: initialize parameters from devicetree) Stéphan Kochen
2016-01-28 5:05 ` Interrupt driven thermal OF sensors Guenter Roeck
2016-01-29 0:16 ` Stéphan Kochen
2016-01-21 19:34 ` [PATCH 3/3] lm90: register with thermal zones Stéphan Kochen
[not found] ` <1453404877-17897-4-git-send-email-stephan-j6uo2F6POYhmR6Xm/wNWPw@public.gmane.org>
2016-01-22 22:45 ` [lm-sensors] " Rob Herring
2016-01-22 22:45 ` Rob Herring
2016-01-22 23:02 ` [lm-sensors] " Stéphan Kochen
2016-01-22 23:02 ` Stéphan Kochen
[not found] ` <20160122230239.GA22301-3Ql6wuUqVi7fKcxHm0zdRv8+0UxHXcjY@public.gmane.org>
2016-01-22 23:11 ` [lm-sensors] " Rob Herring
2016-01-22 23:11 ` Rob Herring
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=56A2EB3E.4080002@roeck-us.net \
--to=linux@roeck-us.net \
--cc=devicetree@vger.kernel.org \
--cc=edubezval@gmail.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jdelvare@suse.com \
--cc=linux-pm@vger.kernel.org \
--cc=lm-sensors@lm-sensors.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=rui.zhang@intel.com \
--cc=stephan@kochen.nl \
/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.