summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2023-09-26 16:25:32 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-27 18:11:35 +0300
commitac630fb8dbb57d052ed2b3d0fcb2e477484d61d1 (patch)
treeabf5af4ee363932d1d4ed19c629a757e9dfbe2cf /arch/arm
parenta95f279ecd339c40039e39b6dc0c5f270e8efe25 (diff)
downloadlinux-ac630fb8dbb57d052ed2b3d0fcb2e477484d61d1.tar.xz
ASoC: ti: Convert Pandora ASoC to GPIO descriptors
[ Upstream commit 319e6ac143b9e9048e527ab9dd2aabb8fdf3d60f ] The Pandora uses GPIO descriptors pretty much exclusively, but not for ASoC, so let's fix it. Register the pins in a descriptor table in the machine since the ASoC device is not using device tree. Use static locals for the GPIO descriptors because I'm not able to experient with better state storage on any real hardware. Others using the Pandora can come afterwards and improve this. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Link: https://lore.kernel.org/r/20230926-descriptors-asoc-ti-v1-4-60cf4f8adbc5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/pdata-quirks.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index c1c0121f478d..b947bacf23a3 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -275,9 +275,19 @@ static struct platform_device pandora_backlight = {
.id = -1,
};
+static struct gpiod_lookup_table pandora_soc_audio_gpios = {
+ .dev_id = "soc-audio",
+ .table = {
+ GPIO_LOOKUP("gpio-112-127", 6, "dac", GPIO_ACTIVE_HIGH),
+ GPIO_LOOKUP("gpio-0-15", 14, "amp", GPIO_ACTIVE_HIGH),
+ { }
+ },
+};
+
static void __init omap3_pandora_legacy_init(void)
{
platform_device_register(&pandora_backlight);
+ gpiod_add_lookup_table(&pandora_soc_audio_gpios);
}
#endif /* CONFIG_ARCH_OMAP3 */