lkml.org 
[lkml]   [2021]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 10/12] opp: Support set_opp() customization without requiring to use regulators
On 18-01-21, 21:48, Dmitry Osipenko wrote:
> 18.01.2021 14:44, Viresh Kumar пишет:
> > On 18-01-21, 03:55, Dmitry Osipenko wrote:
> >> diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
> >> index eefd0b15890c..c98fd2add563 100644
> >> --- a/include/linux/pm_opp.h
> >> +++ b/include/linux/pm_opp.h
> >> @@ -13,6 +13,7 @@
> >>
> >> #include <linux/energy_model.h>
> >> #include <linux/err.h>
> >> +#include <linux/kref.h>
> >> #include <linux/notifier.h>
> >>
> >> struct clk;
> >> @@ -74,6 +75,7 @@ struct dev_pm_opp_info {
> >> * @regulator_count: Number of regulators
> >> * @clk: Pointer to clk
> >> * @dev: Pointer to the struct device
> >> + * @kref: Reference counter
> >> *
> >> * This structure contains all information required for setting an OPP.
> >> */
> >> @@ -85,6 +87,7 @@ struct dev_pm_set_opp_data {
> >> unsigned int regulator_count;
> >> struct clk *clk;
> >> struct device *dev;
> >> + struct kref kref;
> >> };
> >
> > Instead of kref thing, allocate the memory for supplies from
> > dev_pm_opp_set_regulators() and store it in new entries in opp-table
> > and for rest of the data from dev_pm_opp_register_set_opp_helper(), to
> > which you can copy supplies pointers then.
> >
>
> Could you please show a code sample?

Sent a patch to you.

--
viresh

\
 
 \ /
  Last update: 2021-01-19 07:39    [W:0.123 / U:0.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site