summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/board-n8x0.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2023-09-26 15:25:29 +0200
committerMark Brown <broonie@kernel.org>2023-10-02 14:06:19 +0100
commit22041ed154aaf89f31306014a305dde516c308ea (patch)
tree2e33d91b7459d7264593ef8f4f57e8d1b5aa2fb8 /arch/arm/mach-omap2/board-n8x0.c
parent5b12dd84499a74be9d133e020e424025359a244f (diff)
ASoC: ti: Convert N810 ASoC to GPIO descriptors
The N810 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 N810 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-1-60cf4f8adbc5@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'arch/arm/mach-omap2/board-n8x0.c')
-rw-r--r--arch/arm/mach-omap2/board-n8x0.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-n8x0.c b/arch/arm/mach-omap2/board-n8x0.c
index 8e3b5068d4ab..31755a378c73 100644
--- a/arch/arm/mach-omap2/board-n8x0.c
+++ b/arch/arm/mach-omap2/board-n8x0.c
@@ -498,6 +498,15 @@ struct menelaus_platform_data n8x0_menelaus_platform_data = {
.late_init = n8x0_menelaus_late_init,
};
+static struct gpiod_lookup_table nokia810_asoc_gpio_table = {
+ .dev_id = "soc-audio",
+ .table = {
+ GPIO_LOOKUP("gpio-0-15", 10, "headset", GPIO_ACTIVE_HIGH),
+ GPIO_LOOKUP("gpio-80-111", 21, "speaker", GPIO_ACTIVE_HIGH),
+ { }
+ },
+};
+
static int __init n8x0_late_initcall(void)
{
if (!board_caps)
@@ -505,6 +514,7 @@ static int __init n8x0_late_initcall(void)
n8x0_mmc_init();
n8x0_usb_init();
+ gpiod_add_lookup_table(&nokia810_asoc_gpio_table);
return 0;
}