Thread (44 messages) 44 messages, 2 authors, 2021-11-28
STALE1658d REVIEWED: 1 (0M)
Revisions (3)
  1. v14 [diff vs current]
  2. v15 current
  3. v16 [diff vs current]

[PATCH v15 02/39] soc/tegra: Add devm_tegra_core_dev_init_opp_table_common()

From: Dmitry Osipenko <digetx@gmail.com>
Date: 2021-11-14 19:37:45
Also in: dri-devel, linux-clk, linux-mmc, linux-pwm, linux-tegra, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 include/soc/tegra/common.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/include/soc/tegra/common.h b/include/soc/tegra/common.h
index af41ad80ec21..8ec1ac07fc85 100644
--- a/include/soc/tegra/common.h
+++ b/include/soc/tegra/common.h
@@ -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__ */
-- 
2.33.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help