forked from Minki/linux
soc/tegra: Add devm_tegra_core_dev_init_opp_table_common()
Only couple drivers need to get the -ENODEV error code and majority of drivers need to explicitly initialize the performance state. Add new common helper which sets up OPP table for these drivers. Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
006da96c84
commit
9131c63317
@ -39,4 +39,19 @@ devm_tegra_core_dev_init_opp_table(struct device *dev,
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
devm_tegra_core_dev_init_opp_table_common(struct device *dev)
|
||||
{
|
||||
struct tegra_core_opp_params opp_params = {};
|
||||
int err;
|
||||
|
||||
opp_params.init_state = true;
|
||||
|
||||
err = devm_tegra_core_dev_init_opp_table(dev, &opp_params);
|
||||
if (err != -ENODEV)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* __SOC_TEGRA_COMMON_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user