diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2022-05-25 15:23:16 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2022-07-08 11:27:32 +0530 |
commit | 11b9b663585c4f8b00846089ebbca4d1e3283e86 (patch) | |
tree | d34dcb1302c71e863815cb7a4d0c6d928f1c5d25 /drivers/opp/opp.h | |
parent | 87686cc845c3be7dea777f1dbf2de0767007cda8 (diff) | |
download | linux-11b9b663585c4f8b00846089ebbca4d1e3283e86.tar.gz linux-11b9b663585c4f8b00846089ebbca4d1e3283e86.tar.bz2 linux-11b9b663585c4f8b00846089ebbca4d1e3283e86.zip |
OPP: Add dev_pm_opp_set_config() and friends
The OPP core already have few configuration specific APIs and it is
getting complex or messy for both the OPP core and its users.
Lets introduce a new set of API which will be used for all kind of
different configurations, and shall eventually be used by all the
existing ones.
The new API, returns a unique token instead of a pointer to the OPP
table, which allows the OPP core to drop the resources selectively later
on.
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/opp/opp.h')
-rw-r--r-- | drivers/opp/opp.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index 9e1cfcb0ea98..d652f0cc84f1 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -28,6 +28,27 @@ extern struct mutex opp_table_lock; extern struct list_head opp_tables, lazy_opp_tables; +/* OPP Config flags */ +#define OPP_CONFIG_CLK BIT(0) +#define OPP_CONFIG_REGULATOR BIT(1) +#define OPP_CONFIG_REGULATOR_HELPER BIT(2) +#define OPP_CONFIG_PROP_NAME BIT(3) +#define OPP_CONFIG_SUPPORTED_HW BIT(4) +#define OPP_CONFIG_GENPD BIT(5) + +/** + * struct opp_config_data - data for set config operations + * @opp_table: OPP table + * @flags: OPP config flags + * + * This structure stores the OPP config information for each OPP table + * configuration by the callers. + */ +struct opp_config_data { + struct opp_table *opp_table; + unsigned int flags; +}; + /* * Internal data structure organization with the OPP layer library is as * follows: |