From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Kevin Hilman <khilman@kernel.org>,
Viresh Kumar <vireshk@kernel.org>,
Stephen Boyd <sboyd@kernel.org>, Nishanth Menon <nm@ti.com>
Cc: linux-kernel@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-pm@vger.kernel.org
Subject: [PATCH v9 6/8] soc/tegra: Add devm_tegra_core_dev_init_opp_table_simple()
Date: Fri, 27 Aug 2021 04:34:13 +0300 [thread overview]
Message-ID: <20210827013415.24027-7-digetx@gmail.com> (raw)
In-Reply-To: <20210827013415.24027-1-digetx@gmail.com>
Only couple drivers need to get the -ENODEV error code and explicitly
initialize the performance state. Add new helper that allows to avoid
the extra boilerplate code in majority of drivers.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
include/soc/tegra/common.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/soc/tegra/common.h b/include/soc/tegra/common.h
index af41ad80ec21..265ad90e45a2 100644
--- a/include/soc/tegra/common.h
+++ b/include/soc/tegra/common.h
@@ -39,4 +39,17 @@ devm_tegra_core_dev_init_opp_table(struct device *dev,
}
#endif
+static inline int
+devm_tegra_core_dev_init_opp_table_simple(struct device *dev)
+{
+ struct tegra_core_opp_params params = {};
+ int err;
+
+ err = devm_tegra_core_dev_init_opp_table(dev, ¶ms);
+ if (err != -ENODEV)
+ return err;
+
+ return 0;
+}
+
#endif /* __SOC_TEGRA_COMMON_H__ */
--
2.32.0
next prev parent reply other threads:[~2021-08-27 1:38 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 1:34 [PATCH v9 0/8] NVIDIA Tegra power management patches for 5.16 Dmitry Osipenko
2021-08-27 1:34 ` [PATCH v9 1/8] opp: Add dev_pm_opp_from_clk_rate() Dmitry Osipenko
2021-08-27 1:42 ` Dmitry Osipenko
2021-08-27 3:00 ` kernel test robot
2021-08-27 3:00 ` Viresh Kumar
2021-08-27 3:28 ` Dmitry Osipenko
2021-08-27 7:27 ` kernel test robot
2021-08-27 1:34 ` [PATCH v9 2/8] opp: Allow dev_pm_opp_set_clkname() to replace released clock Dmitry Osipenko
2021-08-27 1:34 ` [PATCH v9 3/8] opp: Change type of dev_pm_opp_attach_genpd(names) argument Dmitry Osipenko
2021-08-27 1:34 ` [PATCH v9 4/8] PM: domains: Add get_performance_state() callback Dmitry Osipenko
2021-08-27 14:23 ` Ulf Hansson
2021-08-27 15:50 ` Dmitry Osipenko
2021-08-30 9:19 ` Ulf Hansson
2021-08-27 1:34 ` [PATCH v9 5/8] soc/tegra: pmc: Implement " Dmitry Osipenko
2021-08-27 3:05 ` Viresh Kumar
2021-08-27 3:28 ` Dmitry Osipenko
2021-08-27 3:47 ` Dmitry Osipenko
2021-08-27 3:56 ` Dmitry Osipenko
2021-08-27 4:02 ` Viresh Kumar
2021-08-27 4:08 ` Dmitry Osipenko
2021-08-27 4:13 ` Viresh Kumar
2021-08-27 4:15 ` Dmitry Osipenko
2021-08-27 1:34 ` Dmitry Osipenko [this message]
2021-08-27 1:34 ` [PATCH v9 7/8] gpu: host1x: Add host1x_channel_stop() Dmitry Osipenko
2021-08-27 1:34 ` [PATCH v9 8/8] drm/tegra: gr3d: Support generic power domain and runtime PM Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210827013415.24027-7-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=khilman@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=ulf.hansson@linaro.org \
--cc=vireshk@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox