From 1f378c6ead5c69decf36e8e61de2e50377c76ab8 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Mon, 4 Jul 2022 14:57:06 +0530 Subject: OPP: Remove custom OPP helper support The only user of the custom helper is migrated to use dev_pm_opp_set_config_regulators() interface. Remove the now unused custom OPP helper support. This cleans up _set_opp() and leaves a single code path to be used by all users. Tested-by: Dmitry Osipenko Signed-off-by: Viresh Kumar --- include/linux/pm_opp.h | 51 -------------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'include/linux/pm_opp.h') diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 1e2b33d79ba6..9d59aedc2be3 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -57,39 +57,6 @@ struct dev_pm_opp_icc_bw { u32 peak; }; -/** - * struct dev_pm_opp_info - OPP freq/voltage/current values - * @rate: Target clk rate in hz - * @supplies: Array of voltage/current values for all power supplies - * - * This structure stores the freq/voltage/current values for a single OPP. - */ -struct dev_pm_opp_info { - unsigned long rate; - struct dev_pm_opp_supply *supplies; -}; - -/** - * struct dev_pm_set_opp_data - Set OPP data - * @old_opp: Old OPP info - * @new_opp: New OPP info - * @regulators: Array of regulator pointers - * @regulator_count: Number of regulators - * @clk: Pointer to clk - * @dev: Pointer to the struct device - * - * This structure contains all information required for setting an OPP. - */ -struct dev_pm_set_opp_data { - struct dev_pm_opp_info old_opp; - struct dev_pm_opp_info new_opp; - - struct regulator **regulators; - unsigned int regulator_count; - struct clk *clk; - struct device *dev; -}; - typedef int (*config_regulators_t)(struct device *dev, struct dev_pm_opp *old_opp, struct dev_pm_opp *new_opp, struct regulator **regulators, unsigned int count); @@ -98,7 +65,6 @@ typedef int (*config_regulators_t)(struct device *dev, * struct dev_pm_opp_config - Device OPP configuration values * @clk_names: Clk names, NULL terminated array, max 1 clock for now. * @prop_name: Name to postfix to properties. - * @set_opp: Custom set OPP helper. * @config_regulators: Custom set regulator helper. * @supported_hw: Array of hierarchy of versions to match. * @supported_hw_count: Number of elements in the array. @@ -113,7 +79,6 @@ struct dev_pm_opp_config { /* NULL terminated */ const char * const *clk_names; const char *prop_name; - int (*set_opp)(struct dev_pm_set_opp_data *data); config_regulators_t config_regulators; const unsigned int *supported_hw; unsigned int supported_hw_count; @@ -610,22 +575,6 @@ static inline int devm_pm_opp_set_clkname(struct device *dev, const char *name) return devm_pm_opp_set_config(dev, &config); } -/* set-opp helpers */ -static inline int dev_pm_opp_register_set_opp_helper(struct device *dev, - int (*set_opp)(struct dev_pm_set_opp_data *data)) -{ - struct dev_pm_opp_config config = { - .set_opp = set_opp, - }; - - return dev_pm_opp_set_config(dev, &config); -} - -static inline void dev_pm_opp_unregister_set_opp_helper(int token) -{ - dev_pm_opp_clear_config(token); -} - /* config-regulators helpers */ static inline int dev_pm_opp_set_config_regulators(struct device *dev, config_regulators_t helper) -- cgit v1.2.3