2019-04-01 02:31:58

by MyungJoo Ham

[permalink] [raw]
Subject: RE: [PATCH v2 2/4] opp: add API which get max freq by voltage

>This API will get voltage as input parameter.
>Search all opp items for the item which with max frequency,
>and the voltae is smaller than provided voltage.
>
>Signed-off-by: Andrew-sh.Cheng <[email protected]>
>---
> drivers/opp/core.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++
> include/linux/pm_opp.h | 8 ++++++++
> 2 files changed, 63 insertions(+)
>
>diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h
>index 24c757a..57deef9 100644
>--- a/include/linux/pm_opp.h
>+++ b/include/linux/pm_opp.h
>@@ -102,6 +102,8 @@ struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev,
>
> struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev,
> unsigned long *freq);
>+struct dev_pm_opp *dev_pm_opp_find_max_freq_by_volt(struct device *dev,
>+ unsigned long u_volt);

For the symmetricity, wouldn't it be better to name it
dev_pm_opp_find_volt_ceiling(dev, u_volt); ?

Cheers,
MyungJoo