From: Roger Lu <roger.lu@mediatek.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Andrew-sh Cheng (鄭式勳)" <andrew-sh.cheng@mediatek.com>,
"MyungJoo Ham" <myungjoo.ham@samsung.com>,
"Kyungmin Park" <kyungmin.park@samsung.com>,
"Chanwoo Choi" <cw00.choi@samsung.com>,
"Rob Herring" <robh+dt@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Nishanth Menon" <nm@ti.com>, "Stephen Boyd" <sboyd@kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
srv_heupstream <srv_heupstream@mediatek.com>,
"Fan Chen (陳凡)" <fan.chen@mediatek.com>,
"Stephen Boyd" <sboyd@codeaurora.org>
Subject: Re: [v4, 6/8] PM / OPP: Support adjusting OPP voltages at runtime
Date: Fri, 1 Nov 2019 16:08:58 +0800 [thread overview]
Message-ID: <1572595738.6939.7.camel@mtksdaap41> (raw)
In-Reply-To: <20190819111836.5cu245xre6ky6xav@vireshk-i7>
Dear Viresh,
Sorry for the late reply.
On Mon, 2019-08-19 at 19:18 +0800, Viresh Kumar wrote:
> On 13-08-19, 21:31, Andrew-sh.Cheng wrote:
> > From: Stephen Boyd <sboyd@codeaurora.org>
> >
> > On some SoCs the Adaptive Voltage Scaling (AVS) technique is
> > employed to optimize the operating voltage of a device. At a
> > given frequency, the hardware monitors dynamic factors and either
> > makes a suggestion for how much to adjust a voltage for the
> > current frequency, or it automatically adjusts the voltage
> > without software intervention. Add an API to the OPP library for
> > the former case, so that AVS type devices can update the voltages
> > for an OPP when the hardware determines the voltage should
> > change. The assumption is that drivers like CPUfreq or devfreq
> > will register for the OPP notifiers and adjust the voltage
> > according to suggestions that AVS makes.
> >
> > This patch is devired from [1] submitted by Stephen.
> > [1] https://lore.kernel.org/patchwork/patch/599279/
> >
> > Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
> > Signed-off-by: Roger Lu <roger.lu@mediatek.com>
> > ---
> > drivers/opp/core.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++
> > include/linux/pm_opp.h | 11 +++++++++
> > 2 files changed, 74 insertions(+)
> >
> > diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> > index c094d5d20fd7..407a07f29b12 100644
> > --- a/drivers/opp/core.c
> > +++ b/drivers/opp/core.c
> > @@ -2054,6 +2054,69 @@ static int _opp_set_availability(struct device *dev, unsigned long freq,
> > }
> >
> > /**
> > + * dev_pm_opp_adjust_voltage() - helper to change the voltage of an OPP
> > + * @dev: device for which we do this operation
> > + * @freq: OPP frequency to adjust voltage of
> > + * @u_volt: new OPP voltage
> > + *
> > + * Return: -EINVAL for bad pointers, -ENOMEM if no memory available for the
> > + * copy operation, returns 0 if no modifcation was done OR modification was
> > + * successful.
> > + */
> > +int dev_pm_opp_adjust_voltage(struct device *dev, unsigned long freq,
> > + unsigned long u_volt)
>
> Can you please update this to take a triplet instead ? That is what we are
> storing in OPP core now a days.
I've studied opp/core.c and still don't know meaning of triplet here.
Could you give me more hints (reference API?) about how to take a
triplet instead? Thanks in advance.
next prev parent reply other threads:[~2019-11-01 8:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1565703113-31479-1-git-send-email-andrew-sh.cheng@mediatek.com>
[not found] ` <1565703113-31479-3-git-send-email-andrew-sh.cheng@mediatek.com>
2019-08-19 9:50 ` [v4, 2/8] cpufreq: mediatek: add clock enable for intermediate clock Viresh Kumar
[not found] ` <1565703113-31479-2-git-send-email-andrew-sh.cheng@mediatek.com>
2019-08-19 9:51 ` [v4, 1/8] cpufreq: mediatek: change to regulator_get_optional Viresh Kumar
[not found] ` <1565703113-31479-4-git-send-email-andrew-sh.cheng@mediatek.com>
2019-08-19 9:59 ` [v4, 3/8] cpufreq: mediatek: Add support for mt8183 Viresh Kumar
[not found] ` <1565703113-31479-8-git-send-email-andrew-sh.cheng@mediatek.com>
2019-08-20 3:39 ` [v4, 7/8] cpufreq: mediatek: add opp notification for SVS support Viresh Kumar
[not found] ` <1571193828.22071.5.camel@mtksdaap41>
2019-10-17 6:31 ` Viresh Kumar
[not found] ` <1571389431.27207.4.camel@mtksdaap41>
2019-10-18 9:53 ` Viresh Kumar
[not found] ` <1565703113-31479-7-git-send-email-andrew-sh.cheng@mediatek.com>
2019-08-19 11:18 ` [v4, 6/8] PM / OPP: Support adjusting OPP voltages at runtime Viresh Kumar
2019-11-01 8:08 ` Roger Lu [this message]
2019-11-05 6:56 ` Viresh Kumar
2019-08-22 13:51 ` Matthias Brugger
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=1572595738.6939.7.camel@mtksdaap41 \
--to=roger.lu@mediatek.com \
--cc=andrew-sh.cheng@mediatek.com \
--cc=cw00.choi@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=fan.chen@mediatek.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthias.bgg@gmail.com \
--cc=myungjoo.ham@samsung.com \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=sboyd@kernel.org \
--cc=srv_heupstream@mediatek.com \
--cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).