From: Praveen Talari <quic_ptalari@quicinc.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-serial@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-pm@vger.kernel.org>, <psodagud@quicinc.com>,
<djaggi@quicinc.com>, <quic_msavaliy@quicinc.com>,
<quic_vtanuku@quicinc.com>, <quic_arandive@quicinc.com>,
<quic_mnaresh@quicinc.com>, <quic_shazhuss@quicinc.com>,
Nikunj Kela <quic_nkela@quicinc.com>
Subject: Re: [PATCH v2 1/9] opp: add new helper API dev_pm_opp_set_level()
Date: Tue, 22 Apr 2025 22:37:25 +0530 [thread overview]
Message-ID: <e6e1ee6d-a12f-4e18-b2d7-65d1ccca5308@quicinc.com> (raw)
In-Reply-To: <20250421074004.yttb42qq4p5xzi3o@vireshk-i7>
Thank viresh for review.
On 4/21/2025 1:10 PM, Viresh Kumar wrote:
> On 18-04-25, 20:42, Praveen Talari wrote:
>> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
>> index 73e9a3b2f29b..a9bca9502f71 100644
>> --- a/drivers/opp/core.c
>> +++ b/drivers/opp/core.c
>> @@ -3151,3 +3151,25 @@ void dev_pm_opp_remove_table(struct device *dev)
>> dev_pm_opp_put_opp_table(opp_table);
>> }
>> EXPORT_SYMBOL_GPL(dev_pm_opp_remove_table);
>> +
>> +/*
>> + * dev_pm_opp_set_level() - Configure device for a level
>> + * @dev: device for which we do this operation
>> + * @level: level to set to
>> + *
>> + * Return: 0 on success, a negative error number otherwise.
>> + */
>> +int dev_pm_opp_set_level(struct device *dev, unsigned int level)
> I would rather move this to pm_opp.h as an inline helper.
most of helper APIs in core.c and even i don't see any helper API in
pm_opp.c.
please let me know if you still need to add in pm_opp.h.
>
>> +{
>> + struct dev_pm_opp *opp = dev_pm_opp_find_level_exact(dev, level);
>> + int ret;
>> +
>> + if (IS_ERR(opp))
>> + return -EINVAL;
> Why not reuse the same error value ?
as reference of APIs in core.c, i have used -EINVAl instead of IS_ERR(opp).
Let me know your thoughts on return value.
>
>> +
>> + ret = dev_pm_opp_set_opp(dev, opp);
>> + dev_pm_opp_put(opp);
>> +
>> + return ret;
>> +}
>> +EXPORT_SYMBOL_GPL(dev_pm_opp_set_level);
> Make the changes and send it separately (or with the series, your
> choice), I will apply it to the OPP tree. Thanks.
>
next prev parent reply other threads:[~2025-04-22 17:07 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 15:12 [PATCH v2 0/9] Enable QUPs and Serial on SA8255p Qualcomm platforms Praveen Talari
2025-04-18 15:12 ` [PATCH v2 1/9] opp: add new helper API dev_pm_opp_set_level() Praveen Talari
2025-04-21 7:40 ` Viresh Kumar
2025-04-22 17:07 ` Praveen Talari [this message]
2025-04-23 5:36 ` Viresh Kumar
2025-04-23 6:28 ` Praveen Talari
2025-04-18 15:12 ` [PATCH v2 2/9] dt-bindings: serial: describe SA8255p Praveen Talari
2025-04-25 10:12 ` Krzysztof Kozlowski
2025-04-25 11:01 ` Praveen Talari
2025-04-18 15:12 ` [PATCH v2 3/9] dt-bindings: qcom: geni-se: " Praveen Talari
2025-04-25 10:16 ` Krzysztof Kozlowski
2025-04-25 11:00 ` Praveen Talari
2025-04-18 15:12 ` [PATCH v2 4/9] soc: qcom: geni-se: Enable QUPs on SA8255p Qualcomm platforms Praveen Talari
2025-04-18 15:12 ` [PATCH v2 5/9] serial: qcom-geni: move resource initialization to separate function Praveen Talari
2025-04-18 15:12 ` [PATCH v2 6/9] serial: qcom-geni: move resource control logic to separate functions Praveen Talari
2025-04-18 15:12 ` [PATCH v2 7/9] serial: qcom-geni: move clock-rate logic to separate function Praveen Talari
2025-04-18 15:12 ` [PATCH v2 8/9] serial: qcom-geni: Enable PM runtime for serial driver Praveen Talari
2025-04-18 15:12 ` [PATCH v2 9/9] serial: qcom-geni: Enable Serial on SA8255p Qualcomm platforms Praveen Talari
2025-04-23 13:01 ` [PATCH v2 0/9] Enable QUPs and " Konrad Dybcio
2025-04-25 14:18 ` Praveen Talari
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=e6e1ee6d-a12f-4e18-b2d7-65d1ccca5308@quicinc.com \
--to=quic_ptalari@quicinc.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=djaggi@quicinc.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=nm@ti.com \
--cc=psodagud@quicinc.com \
--cc=quic_arandive@quicinc.com \
--cc=quic_mnaresh@quicinc.com \
--cc=quic_msavaliy@quicinc.com \
--cc=quic_nkela@quicinc.com \
--cc=quic_shazhuss@quicinc.com \
--cc=quic_vtanuku@quicinc.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=viresh.kumar@linaro.org \
--cc=vireshk@kernel.org \
/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