[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6a759144-2e0a-4d86-ae01-c67ebb347fd5@linaro.org>
Date: Wed, 27 Dec 2023 11:47:34 +0100
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: rjw@...ysocki.net, lukasz.luba@....com
Cc: rui.zhang@...el.com, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: Re: [PATCH v4 1/2] thermal/debugfs: Add thermal cooling device
debugfs information
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
Powered by blists - more mailing lists