* [PATCH v1 1/2] ASoC: mediatek: Add interrupt-names property in binding text
@ 2017-08-18 1:28 Ryder Lee
2017-08-18 1:28 ` [PATCH v1 2/2] ASoC: mediatek: switch to use platform_get_irq_byname() Ryder Lee
2017-08-18 11:48 ` Applied "ASoC: mediatek: Add interrupt-names property in binding text" " Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Ryder Lee @ 2017-08-18 1:28 UTC (permalink / raw)
To: Mark Brown
Cc: linux-mediatek, linux-kernel, alsa-devel, devicetree, Ryder Lee,
Garlic Tseng
Add interrupt-names property in DT - if future revisions of the IP
have different sets of interrupts the binding can adapt gracefully.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
CC: Garlic Tseng <garlic.tseng@mediatek.com>
---
Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
index 9800a56..77a57f8 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -3,7 +3,8 @@ Mediatek AFE PCM controller for mt2701
Required properties:
- compatible = "mediatek,mt2701-audio";
- reg: register location and size
-- interrupts: Should contain AFE interrupt
+- interrupts: should contain AFE and ASYS interrupts
+- interrupt-names: should be "afe" and "asys"
- power-domains: should define the power domain
- clock-names: should have these clock names:
"infra_sys_audio_clk",
@@ -59,6 +60,7 @@ Example:
<0 0x112A0000 0 0x20000>;
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
<GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "afe", "asys";
power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
clocks = <&infracfg CLK_INFRA_AUDIO>,
<&topckgen CLK_TOP_AUD_MUX1_SEL>,
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v1 2/2] ASoC: mediatek: switch to use platform_get_irq_byname()
2017-08-18 1:28 [PATCH v1 1/2] ASoC: mediatek: Add interrupt-names property in binding text Ryder Lee
@ 2017-08-18 1:28 ` Ryder Lee
2017-08-18 11:48 ` Applied "ASoC: mediatek: switch to use platform_get_irq_byname()" to the asoc tree Mark Brown
2017-08-18 11:48 ` Applied "ASoC: mediatek: Add interrupt-names property in binding text" " Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Ryder Lee @ 2017-08-18 1:28 UTC (permalink / raw)
To: Mark Brown
Cc: linux-mediatek, linux-kernel, alsa-devel, devicetree, Ryder Lee,
Garlic Tseng
Switch to use platform_get_irq_byname() so that binding can be agnostic
of the IRQ order.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
CC: Garlic Tseng <garlic.tseng@mediatek.com>
---
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index bc5d4db..c7d38bf 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -1496,14 +1496,12 @@ static int mt2701_afe_runtime_resume(struct device *dev)
static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
{
- int ret, i;
- unsigned int irq_id;
struct mtk_base_afe *afe;
struct mt2701_afe_private *afe_priv;
struct resource *res;
struct device *dev;
+ int i, irq_id, ret;
- ret = 0;
afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
if (!afe)
return -ENOMEM;
@@ -1516,11 +1514,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
afe->dev = &pdev->dev;
dev = afe->dev;
- irq_id = platform_get_irq(pdev, 0);
- if (!irq_id) {
- dev_err(dev, "%s no irq found\n", dev->of_node->name);
- return -ENXIO;
+ irq_id = platform_get_irq_byname(pdev, "asys");
+ if (irq_id < 0) {
+ dev_err(dev, "unable to get ASYS IRQ\n");
+ return irq_id;
}
+
ret = devm_request_irq(dev, irq_id, mt2701_asys_isr,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
if (ret) {
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "ASoC: mediatek: switch to use platform_get_irq_byname()" to the asoc tree
2017-08-18 1:28 ` [PATCH v1 2/2] ASoC: mediatek: switch to use platform_get_irq_byname() Ryder Lee
@ 2017-08-18 11:48 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2017-08-18 11:48 UTC (permalink / raw)
To: Ryder Lee
Cc: Mark Brown, Mark Brown, devicetree, alsa-devel, Garlic Tseng,
linux-kernel, linux-mediatek, alsa-devel
The patch
ASoC: mediatek: switch to use platform_get_irq_byname()
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From f6c1626e28f22115ded520300b56fa049c068f4f Mon Sep 17 00:00:00 2001
From: Ryder Lee <ryder.lee@mediatek.com>
Date: Fri, 18 Aug 2017 09:28:50 +0800
Subject: [PATCH] ASoC: mediatek: switch to use platform_get_irq_byname()
Switch to use platform_get_irq_byname() so that binding can be agnostic
of the IRQ order.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
CC: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
index 10dcd69c5ffa..8fda182f849b 100644
--- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
+++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c
@@ -1496,14 +1496,12 @@ static int mt2701_afe_runtime_resume(struct device *dev)
static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
{
- int ret, i;
- unsigned int irq_id;
struct mtk_base_afe *afe;
struct mt2701_afe_private *afe_priv;
struct resource *res;
struct device *dev;
+ int i, irq_id, ret;
- ret = 0;
afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
if (!afe)
return -ENOMEM;
@@ -1516,11 +1514,12 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
afe->dev = &pdev->dev;
dev = afe->dev;
- irq_id = platform_get_irq(pdev, 0);
- if (!irq_id) {
- dev_err(dev, "%s no irq found\n", dev->of_node->name);
- return -ENXIO;
+ irq_id = platform_get_irq_byname(pdev, "asys");
+ if (irq_id < 0) {
+ dev_err(dev, "unable to get ASYS IRQ\n");
+ return irq_id;
}
+
ret = devm_request_irq(dev, irq_id, mt2701_asys_isr,
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
if (ret) {
--
2.13.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "ASoC: mediatek: Add interrupt-names property in binding text" to the asoc tree
2017-08-18 1:28 [PATCH v1 1/2] ASoC: mediatek: Add interrupt-names property in binding text Ryder Lee
2017-08-18 1:28 ` [PATCH v1 2/2] ASoC: mediatek: switch to use platform_get_irq_byname() Ryder Lee
@ 2017-08-18 11:48 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2017-08-18 11:48 UTC (permalink / raw)
To: Ryder Lee
Cc: Mark Brown, Mark Brown, devicetree, alsa-devel, Garlic Tseng,
linux-kernel, linux-mediatek, alsa-devel
The patch
ASoC: mediatek: Add interrupt-names property in binding text
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 57127d9b8bcbecaac9470f62361570939dde49fd Mon Sep 17 00:00:00 2001
From: Ryder Lee <ryder.lee@mediatek.com>
Date: Fri, 18 Aug 2017 09:28:49 +0800
Subject: [PATCH] ASoC: mediatek: Add interrupt-names property in binding text
Add interrupt-names property in DT - if future revisions of the IP
have different sets of interrupts the binding can adapt gracefully.
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
CC: Garlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
index 9800a560e0c2..77a57f84bed4 100644
--- a/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
+++ b/Documentation/devicetree/bindings/sound/mt2701-afe-pcm.txt
@@ -3,7 +3,8 @@ Mediatek AFE PCM controller for mt2701
Required properties:
- compatible = "mediatek,mt2701-audio";
- reg: register location and size
-- interrupts: Should contain AFE interrupt
+- interrupts: should contain AFE and ASYS interrupts
+- interrupt-names: should be "afe" and "asys"
- power-domains: should define the power domain
- clock-names: should have these clock names:
"infra_sys_audio_clk",
@@ -59,6 +60,7 @@ Example:
<0 0x112A0000 0 0x20000>;
interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>,
<GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "afe", "asys";
power-domains = <&scpsys MT2701_POWER_DOMAIN_IFR_MSC>;
clocks = <&infracfg CLK_INFRA_AUDIO>,
<&topckgen CLK_TOP_AUD_MUX1_SEL>,
--
2.13.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-08-18 11:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18 1:28 [PATCH v1 1/2] ASoC: mediatek: Add interrupt-names property in binding text Ryder Lee
2017-08-18 1:28 ` [PATCH v1 2/2] ASoC: mediatek: switch to use platform_get_irq_byname() Ryder Lee
2017-08-18 11:48 ` Applied "ASoC: mediatek: switch to use platform_get_irq_byname()" to the asoc tree Mark Brown
2017-08-18 11:48 ` Applied "ASoC: mediatek: Add interrupt-names property in binding text" " Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).