lkml.org 
[lkml]   [2021]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 10/12] opp: Support set_opp() customization without requiring to use regulators
From
Date
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?

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