public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: rjw@rjwysocki.net, lukasz.luba@arm.com
Cc: rui.zhang@intel.com, linux-kernel@vger.kernel.org,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v4 1/2] thermal/debugfs: Add thermal cooling device debugfs information
Date: Wed, 27 Dec 2023 11:47:34 +0100	[thread overview]
Message-ID: <6a759144-2e0a-4d86-ae01-c67ebb347fd5@linaro.org> (raw)
In-Reply-To: <20231227102643.2655651-1-daniel.lezcano@linaro.org>

On 27/12/2023 11:26, Daniel Lezcano wrote:

[ ... ]

> +void thermal_set_delay_jiffies(unsigned long *delay_jiffies, int delay_ms)
>   {
> -	if (cdev->ops->set_cur_state(cdev, target))
> -		return;
> +	*delay_jiffies = msecs_to_jiffies(delay_ms);
> +	if (delay_ms > 1000)
> +		*delay_jiffies = round_jiffies(*delay_jiffies);
> +}

Please ignore this version. I forgot to remove this unrelated change 
from a previous test.

> +
> +static int thermal_cdev_set_cur_state(struct thermal_cooling_device *cdev, int state)
> +{
> +	int ret;
>   
> -	thermal_notify_cdev_state_update(cdev->id, target);
> -	thermal_cooling_device_stats_update(cdev, target);
> +	/*
> +	 * No check is needed for the ops->set_cur_state as the
> +	 * registering function checked the ops are correctly set
> +	 */
> +	ret = cdev->ops->set_cur_state(cdev, state);
> +	if (!ret) {
> +		thermal_notify_cdev_state_update(cdev->id, state);
> +		thermal_cooling_device_stats_update(cdev, state);
> +		thermal_debug_cdev_state_update(cdev, state);
> +	}
> +
> +	return ret;

[ ... ]

-- 
<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


      parent reply	other threads:[~2023-12-27 10:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27 10:26 [PATCH v4 1/2] thermal/debugfs: Add thermal cooling device debugfs information Daniel Lezcano
2023-12-27 10:26 ` [PATCH v4 2/2] thermal/debugfs: Add thermal debugfs information for mitigation episodes Daniel Lezcano
2023-12-27 10:47 ` Daniel Lezcano [this message]

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=6a759144-2e0a-4d86-ae01-c67ebb347fd5@linaro.org \
    --to=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=rui.zhang@intel.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