From: Dmitry Osipenko <digetx@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com>,
Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>, Agneli <poczt@protonmail.ch>
Cc: linux-tegra@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: [PATCH v5 05/11] ASoC: tegra20: spdif: Support device-tree
Date: Fri, 17 Dec 2021 20:56:00 +0300 [thread overview]
Message-ID: <20211217175606.22645-6-digetx@gmail.com> (raw)
In-Reply-To: <20211217175606.22645-1-digetx@gmail.com>
Tegra20 S/PDIF driver was added in a pre-DT era and was never used since
that time. Revive driver by adding device-tree support.
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
sound/soc/tegra/tegra20_spdif.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sound/soc/tegra/tegra20_spdif.c b/sound/soc/tegra/tegra20_spdif.c
index e45e371edc42..801784915004 100644
--- a/sound/soc/tegra/tegra20_spdif.c
+++ b/sound/soc/tegra/tegra20_spdif.c
@@ -10,6 +10,7 @@
#include <linux/device.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
@@ -270,7 +271,7 @@ static int tegra20_spdif_platform_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, spdif);
- spdif->clk_spdif_out = devm_clk_get(&pdev->dev, "spdif_out");
+ spdif->clk_spdif_out = devm_clk_get(&pdev->dev, "out");
if (IS_ERR(spdif->clk_spdif_out)) {
pr_err("Can't retrieve spdif clock\n");
ret = PTR_ERR(spdif->clk_spdif_out);
@@ -340,10 +341,17 @@ static const struct dev_pm_ops tegra20_spdif_pm_ops = {
tegra20_spdif_runtime_resume, NULL)
};
+static const struct of_device_id tegra20_spdif_of_match[] = {
+ { .compatible = "nvidia,tegra20-spdif", },
+ {},
+};
+MODULE_DEVICE_TABLE(of, tegra20_spdif_of_match);
+
static struct platform_driver tegra20_spdif_driver = {
.driver = {
.name = DRV_NAME,
.pm = &tegra20_spdif_pm_ops,
+ .of_match_table = tegra20_spdif_of_match,
},
.probe = tegra20_spdif_platform_probe,
.remove = tegra20_spdif_platform_remove,
@@ -354,4 +362,3 @@ module_platform_driver(tegra20_spdif_driver);
MODULE_AUTHOR("Stephen Warren <swarren@nvidia.com>");
MODULE_DESCRIPTION("Tegra20 SPDIF ASoC driver");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:" DRV_NAME);
--
2.33.1
next prev parent reply other threads:[~2021-12-17 17:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-17 17:55 [PATCH v5 00/11] Support HDMI audio on NVIDIA Tegra20 Dmitry Osipenko
2021-12-17 17:55 ` [PATCH v5 01/11] ASoC: dt-bindings: Add binding for Tegra20 S/PDIF Dmitry Osipenko
2021-12-17 17:55 ` [PATCH v5 02/11] ASoC: dt-bindings: tegra20-i2s: Convert to schema Dmitry Osipenko
2021-12-17 17:55 ` [PATCH v5 03/11] ASoC: dt-bindings: tegra20-i2s: Document new nvidia,fixed-parent-rate property Dmitry Osipenko
2021-12-17 17:55 ` [PATCH v5 04/11] ASoC: tegra20: spdif: Set FIFO trigger level Dmitry Osipenko
2021-12-17 17:56 ` Dmitry Osipenko [this message]
2021-12-17 17:56 ` [PATCH v5 06/11] ASoC: tegra20: spdif: Improve driver's code Dmitry Osipenko
2021-12-17 17:56 ` [PATCH v5 07/11] ASoC: tegra20: spdif: Use more resource-managed helpers Dmitry Osipenko
2021-12-17 17:56 ` [PATCH v5 08/11] ASoC: tegra20: spdif: Reset hardware Dmitry Osipenko
2021-12-17 17:56 ` [PATCH v5 09/11] ASoC: tegra20: spdif: Support system suspend Dmitry Osipenko
2021-12-17 17:56 ` [PATCH v5 10/11] ASoC: tegra20: spdif: Filter out unsupported rates Dmitry Osipenko
2021-12-17 17:56 ` [PATCH v5 11/11] ASoC: tegra20: i2s: " Dmitry Osipenko
2021-12-17 18:05 ` [PATCH v5 00/11] Support HDMI audio on NVIDIA Tegra20 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=20211217175606.22645-6-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=perex@perex.cz \
--cc=poczt@protonmail.ch \
--cc=thierry.reding@gmail.com \
--cc=tiwai@suse.com \
/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