mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jie Zhan <zhanjie9@hisilicon.com>
To: Bean Huo <beanhuo@iokpp.de>, <linux-pm@vger.kernel.org>,
	<linux-scsi@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	"Martin K . Petersen" <mkp@kernel.org>,
	"James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
	Avri Altman <avri.altman@sandisk.com>,
	Bart Van Assche <bvanassche@acm.org>,
	Alim Akhtar <alim.akhtar@samsung.com>,
	Stanley Jhu <stanleyjhu@google.com>,
	Bean Huo <beanhuo@micron.com>
Subject: Re: [PATCH v2 2/4] PM / devfreq: Add more details to the get_cur_freq() comment
Date: Mon, 14 Sep 2026 14:25:42 +0800	[thread overview]
Message-ID: <02549976-d4cd-4357-892d-9ccd27e5c021@hisilicon.com> (raw)
In-Reply-To: <20260907192140.2701755-3-beanhuo@iokpp.de>



On 9/8/2026 3:21 AM, Bean Huo wrote:
> From: Bean Huo <beanhuo@micron.com>
> 
> 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@micron.com>
> Reviewed-by: Avri Altman <avri.altman@sandisk.com>
Reviewed-by: Jie Zhan <zhanjie9@hisilicon.com>> ---
>  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

  reply	other threads:[~2026-09-14  6:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-07 19:21 [PATCH v2 0/4] devfreq: check the get_cur_freq() return value and use it in ufshcd Bean Huo
2026-09-07 19:21 ` [PATCH v2 1/4] PM / devfreq: Fall back to previous_freq when get_cur_freq() fails Bean Huo
2026-09-14  6:24   ` Jie Zhan
2026-09-07 19:21 ` [PATCH v2 2/4] PM / devfreq: Add more details to the get_cur_freq() comment Bean Huo
2026-09-14  6:25   ` Jie Zhan [this message]
2026-09-07 19:21 ` [PATCH v2 3/4] scsi: ufs: core: Record the frequency the controller starts at Bean Huo
2026-09-07 19:21 ` [PATCH v2 4/4] scsi: ufs: core: Report the current clock frequency to devfreq Bean Huo
2026-09-08  1:34 ` [PATCH v2 0/4] devfreq: check the get_cur_freq() return value and use it in ufshcd Stanley Jhu
2026-09-10  2:28 ` Martin K. Petersen (Oracle)
2026-09-14 13:12 ` Bean Huo

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=02549976-d4cd-4357-892d-9ccd27e5c021@hisilicon.com \
    --to=zhanjie9@hisilicon.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@sandisk.com \
    --cc=beanhuo@iokpp.de \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=cw00.choi@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --cc=stanleyjhu@google.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

all inboxes | Powered by JetHome®