[PATCH 2/3] PM / devfreq: Add more details to the get_cur_freq() comment

From: Bean Huo

Date: Mon Aug 31 2026 - 09:04:44 EST


From: Bean Huo <beanhuo@xxxxxxxxxx>

The comment for ->get_cur_freq() only says that the device should
provide the frequency at which it is operating. It does not tell the
driver author which unit to use, what the return value means, or that
the frequency should be one of @freq_table. These have to be found by
reading the devfreq core.

Add these details to the comment.

Signed-off-by: Bean Huo <beanhuo@xxxxxxxxxx>
---
include/linux/devfreq.h | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/linux/devfreq.h b/include/linux/devfreq.h
index dc1075dc3446..809ef29b9af5 100644
--- a/include/linux/devfreq.h
+++ b/include/linux/devfreq.h
@@ -90,8 +90,11 @@ struct devfreq_dev_status {
* use this directly. Instead, governors are recommended
* to use devfreq_update_stats() along with
* devfreq.last_status.
- * @get_cur_freq: The device should provide the current frequency
- * at which it is operating.
+ * @get_cur_freq: The device should provide the frequency, in Hz, at
+ * which it is currently operating, and return 0, or a
+ * negative errno on failure. The frequency should be one
+ * of @freq_table, as it is used for the transition
+ * statistics.
* @exit: An optional callback that is called when devfreq
* is removing the devfreq object due to error or
* from devfreq_remove_device() call. If the user
--
2.34.1