All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: Lucas Stach <l.stach@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-pm@vger.kernel.org, Tim Harvey <tharvey@gateworks.com>,
	Amit Kucheria <amitk@kernel.org>,
	Jon Nettleton <jon@solid-run.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1] thermal: imx: Update critical temp threshold
Date: Fri, 13 May 2022 18:25:38 +0200	[thread overview]
Message-ID: <4de41b5e-1fa6-ece4-9d9a-2656d399b452@linaro.org> (raw)
In-Reply-To: <20220512135653.GB39979@francesco-nb.int.toradex.com>

On 12/05/2022 15:56, Francesco Dolcini wrote:
> On Thu, May 12, 2022 at 12:52:46PM +0200, Daniel Lezcano wrote:
>> On 12/05/2022 12:24, Francesco Dolcini wrote:
>>> Hello Lucas,
>>>
>>> On Thu, May 12, 2022 at 12:08:08PM +0200, Lucas Stach wrote:
>>>> Am Donnerstag, dem 12.05.2022 um 09:36 +0200 schrieb Francesco Dolcini:
>>
>> [ ... ]
>>
>>> Anyway, would it be fine to have a patch that make the critical
>>> threshold write-able (in my initial message I mentioned this as my
>>> preferred solution also)? If anybody has a pointer on how
>>> to do it, it would be great, I'm not familiar with that code.
>>
>> What about a module param ?
> 
> I would be happy to just be able to write to the `critical`
> trip_point_temp file in sysfs, however the thermal
> framework seems to enforce the critical threshold being read only (only
> `get_trip_temp` callback available). Is there any way to change this?

No, critical trip point is not a system setting but a hardware setting.

It should be set via the DT or a module parameter.


> # cat /sys/class/thermal/thermal_zone0/trip_point_1_type
> critical
> # ls -l /sys/class/thermal/thermal_zone0/trip_point_1_temp
> -r--r--r-- 1 root root 4096 May  6 14:33 /sys/class/thermal/thermal_zone0/trip_point_1_temp





-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: Lucas Stach <l.stach@pengutronix.de>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-pm@vger.kernel.org, Tim Harvey <tharvey@gateworks.com>,
	Amit Kucheria <amitk@kernel.org>,
	Jon Nettleton <jon@solid-run.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Fabio Estevam <festevam@gmail.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1] thermal: imx: Update critical temp threshold
Date: Fri, 13 May 2022 18:25:38 +0200	[thread overview]
Message-ID: <4de41b5e-1fa6-ece4-9d9a-2656d399b452@linaro.org> (raw)
In-Reply-To: <20220512135653.GB39979@francesco-nb.int.toradex.com>

On 12/05/2022 15:56, Francesco Dolcini wrote:
> On Thu, May 12, 2022 at 12:52:46PM +0200, Daniel Lezcano wrote:
>> On 12/05/2022 12:24, Francesco Dolcini wrote:
>>> Hello Lucas,
>>>
>>> On Thu, May 12, 2022 at 12:08:08PM +0200, Lucas Stach wrote:
>>>> Am Donnerstag, dem 12.05.2022 um 09:36 +0200 schrieb Francesco Dolcini:
>>
>> [ ... ]
>>
>>> Anyway, would it be fine to have a patch that make the critical
>>> threshold write-able (in my initial message I mentioned this as my
>>> preferred solution also)? If anybody has a pointer on how
>>> to do it, it would be great, I'm not familiar with that code.
>>
>> What about a module param ?
> 
> I would be happy to just be able to write to the `critical`
> trip_point_temp file in sysfs, however the thermal
> framework seems to enforce the critical threshold being read only (only
> `get_trip_temp` callback available). Is there any way to change this?

No, critical trip point is not a system setting but a hardware setting.

It should be set via the DT or a module parameter.


> # cat /sys/class/thermal/thermal_zone0/trip_point_1_type
> critical
> # ls -l /sys/class/thermal/thermal_zone0/trip_point_1_temp
> -r--r--r-- 1 root root 4096 May  6 14:33 /sys/class/thermal/thermal_zone0/trip_point_1_temp





-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-05-13 16:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-20  9:13 [PATCH v1] thermal: imx: Update critical temp threshold Francesco Dolcini
2022-04-20  9:13 ` Francesco Dolcini
2022-05-09  9:55 ` Daniel Lezcano
2022-05-09  9:55   ` Daniel Lezcano
2022-05-12  7:36   ` Francesco Dolcini
2022-05-12  7:36     ` Francesco Dolcini
2022-05-12 10:08     ` Lucas Stach
2022-05-12 10:08       ` Lucas Stach
2022-05-12 10:24       ` Francesco Dolcini
2022-05-12 10:24         ` Francesco Dolcini
2022-05-12 10:52         ` Daniel Lezcano
2022-05-12 10:52           ` Daniel Lezcano
2022-05-12 13:56           ` Francesco Dolcini
2022-05-12 13:56             ` Francesco Dolcini
2022-05-13 16:25             ` Daniel Lezcano [this message]
2022-05-13 16:25               ` Daniel Lezcano

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=4de41b5e-1fa6-ece4-9d9a-2656d399b452@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=amitk@kernel.org \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=jon@solid-run.com \
    --cc=kernel@pengutronix.de \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tharvey@gateworks.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 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.