From 6c591eec67cbb4db988ab35b944f5cf9013c0714 Mon Sep 17 00:00:00 2001 From: Saravana Kannan Date: Tue, 12 May 2020 15:53:19 +0300 Subject: OPP: Add helpers for reading the binding properties The opp-hz DT property is not mandatory and we may use another property as a key in the OPP table. Add helper functions to simplify the reading and comparing the keys. Signed-off-by: Saravana Kannan Signed-off-by: Georgi Djakov Reviewed-by: Matthias Kaehlcke Reviewed-by: Sibi Sankar [ Viresh: Removed an unnecessary comment ] Signed-off-by: Viresh Kumar --- drivers/opp/opp.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/opp/opp.h') diff --git a/drivers/opp/opp.h b/drivers/opp/opp.h index d14e27102730..bcadb1e328a4 100644 --- a/drivers/opp/opp.h +++ b/drivers/opp/opp.h @@ -211,6 +211,7 @@ struct opp_device *_add_opp_dev(const struct device *dev, struct opp_table *opp_ void _dev_pm_opp_find_and_remove_table(struct device *dev); struct dev_pm_opp *_opp_allocate(struct opp_table *opp_table); void _opp_free(struct dev_pm_opp *opp); +int _opp_compare_key(struct dev_pm_opp *opp1, struct dev_pm_opp *opp2); int _opp_add(struct device *dev, struct dev_pm_opp *new_opp, struct opp_table *opp_table, bool rate_not_available); int _opp_add_v1(struct opp_table *opp_table, struct device *dev, unsigned long freq, long u_volt, bool dynamic); void _dev_pm_opp_cpumask_remove_table(const struct cpumask *cpumask, int last_cpu); -- cgit v1.2.3