All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
	Andy Shevchenko <andy@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, alsa-devel@alsa-project.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 1/8] gpiolib: of: Add quirk for mt2701-cs42448 ASoC sound
Date: Fri, 06 Oct 2023 15:46:24 +0200	[thread overview]
Message-ID: <20231006-descriptors-asoc-mediatek-v1-1-07fe79f337f5@linaro.org> (raw)
In-Reply-To: <20231006-descriptors-asoc-mediatek-v1-0-07fe79f337f5@linaro.org>

These gpio names are due to old DT bindings not following the
"-gpio"/"-gpios" conventions. Handle it using a quirk so the
driver can just look up the GPIOs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-of.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 531faabead0f..d9525d95e818 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -512,6 +512,10 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
 #if IS_ENABLED(CONFIG_SND_SOC_CS42L56)
 		{ "reset",	"cirrus,gpio-nreset",	"cirrus,cs42l56" },
 #endif
+#if IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448)
+		{ "i2s1-in-sel-gpio1",	NULL,	"mediatek,mt2701-cs42448-machine" },
+		{ "i2s1-in-sel-gpio2",	NULL,	"mediatek,mt2701-cs42448-machine" },
+#endif
 #if IS_ENABLED(CONFIG_SND_SOC_TLV320AIC3X)
 		{ "reset",	"gpio-reset",	"ti,tlv320aic3x" },
 		{ "reset",	"gpio-reset",	"ti,tlv320aic33" },

-- 
2.34.1


WARNING: multiple messages have this Message-ID (diff)
From: Linus Walleij <linus.walleij@linaro.org>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
	Andy Shevchenko <andy@kernel.org>,
	 Matthias Brugger <matthias.bgg@gmail.com>,
	 AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,  alsa-devel@alsa-project.org,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH 1/8] gpiolib: of: Add quirk for mt2701-cs42448 ASoC sound
Date: Fri, 06 Oct 2023 15:46:24 +0200	[thread overview]
Message-ID: <20231006-descriptors-asoc-mediatek-v1-1-07fe79f337f5@linaro.org> (raw)
In-Reply-To: <20231006-descriptors-asoc-mediatek-v1-0-07fe79f337f5@linaro.org>

These gpio names are due to old DT bindings not following the
"-gpio"/"-gpios" conventions. Handle it using a quirk so the
driver can just look up the GPIOs.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/gpiolib-of.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 531faabead0f..d9525d95e818 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -512,6 +512,10 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
 #if IS_ENABLED(CONFIG_SND_SOC_CS42L56)
 		{ "reset",	"cirrus,gpio-nreset",	"cirrus,cs42l56" },
 #endif
+#if IS_ENABLED(CONFIG_SND_SOC_MT2701_CS42448)
+		{ "i2s1-in-sel-gpio1",	NULL,	"mediatek,mt2701-cs42448-machine" },
+		{ "i2s1-in-sel-gpio2",	NULL,	"mediatek,mt2701-cs42448-machine" },
+#endif
 #if IS_ENABLED(CONFIG_SND_SOC_TLV320AIC3X)
 		{ "reset",	"gpio-reset",	"ti,tlv320aic3x" },
 		{ "reset",	"gpio-reset",	"ti,tlv320aic33" },

-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-10-06 13:47 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-06 13:46 [PATCH 0/8] Convert Mediatek ASoC codecs to use GPIO descriptors Linus Walleij
2023-10-06 13:46 ` Linus Walleij
2023-10-06 13:46 ` Linus Walleij [this message]
2023-10-06 13:46   ` [PATCH 1/8] gpiolib: of: Add quirk for mt2701-cs42448 ASoC sound Linus Walleij
2023-10-09  7:09   ` Bartosz Golaszewski
2023-10-09  7:09     ` Bartosz Golaszewski
2023-10-09  7:33     ` Linus Walleij
2023-10-09  7:33       ` Linus Walleij
2023-10-09 12:57       ` Bartosz Golaszewski
2023-10-09 12:57         ` Bartosz Golaszewski
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 2/8] ASoC: mediatek: mt2701-cs42448: Convert to GPIO descriptors Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  7:12   ` Bartosz Golaszewski
2023-10-09  7:12     ` Bartosz Golaszewski
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 3/8] ASoC: mt8173-max98090: Drop unused include Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 4/8] ASoC: mt8173-rt5650-rt5514: Drop unused includes Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 5/8] ASoC: mt8173-rt5650-rt5676: " Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 6/8] ASoC: mt8173-rt5650: " Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 7/8] ASoC: mt8186-mt6366-rt1019-rt5682s: Drop unused include Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-06 13:46 ` [PATCH 8/8] ASoC: mt8192-afe-gpio: " Linus Walleij
2023-10-06 13:46   ` Linus Walleij
2023-10-09  8:51   ` AngeloGioacchino Del Regno
2023-10-09  8:51     ` AngeloGioacchino Del Regno
2023-10-09 19:33 ` [PATCH 0/8] Convert Mediatek ASoC codecs to use GPIO descriptors Mark Brown
2023-10-09 19:33   ` Mark Brown

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=20231006-descriptors-asoc-mediatek-v1-1-07fe79f337f5@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=brgl@bgdev.pl \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=perex@perex.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.