diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-09-17 14:40:58 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2022-05-07 22:55:48 +0200 |
commit | 83a551c82d9e861238ae6d1958aa4aa6d1cedb6c (patch) | |
tree | 2f7ed4383d2974ce972b83014277708d97b5898a /arch | |
parent | 216459838355b66a7dc617bfb727878dd8631431 (diff) |
ARM: pxa: z2: use gpio lookup for audio device
The audio device is allocated by the audio driver, and it uses a gpio
number from the mach/z2.h header file.
Change it to use a gpio lookup table for the device allocated by the
driver to keep the header file local to the machine.
Acked-by: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/z2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 7eaeda269927..bb854e903c8f 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -651,6 +651,15 @@ static void __init z2_spi_init(void) static inline void z2_spi_init(void) {} #endif +static struct gpiod_lookup_table z2_audio_gpio_table = { + .dev_id = "soc-audio", + .table = { + GPIO_LOOKUP("gpio-pxa", GPIO37_ZIPITZ2_HEADSET_DETECT, + "hsdet-gpio", GPIO_ACTIVE_HIGH), + { }, + }, +}; + /****************************************************************************** * Core power regulator ******************************************************************************/ @@ -755,6 +764,8 @@ static void __init z2_init(void) z2_keys_init(); z2_pmic_init(); + gpiod_add_lookup_table(&z2_audio_gpio_table); + pm_power_off = z2_power_off; } |