From 218e18a3728507ee82ed2eb10c789671a00e34bd Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Tue, 22 Apr 2014 22:46:35 +0200 Subject: ASoC: qi_lb60: Use GPIO descriptor API The new GPIO descriptor API is now the preferred way for handling GPIOs. It also allows us to separate the platform depended code from the platform independent code (Which will make it possible to increase build test coverage of the platform independent code). Signed-off-by: Lars-Peter Clausen Acked-by: Ralf Baechle Signed-off-by: Mark Brown --- arch/mips/jz4740/board-qi_lb60.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'arch/mips') diff --git a/arch/mips/jz4740/board-qi_lb60.c b/arch/mips/jz4740/board-qi_lb60.c index c01900e5d078..088e92a79ae6 100644 --- a/arch/mips/jz4740/board-qi_lb60.c +++ b/arch/mips/jz4740/board-qi_lb60.c @@ -425,6 +425,15 @@ static struct platform_device qi_lb60_audio_device = { .id = -1, }; +static struct gpiod_lookup_table qi_lb60_audio_gpio_table = { + .dev_id = "qi-lb60-audio", + .table = { + GPIO_LOOKUP("Bank B", 29, "snd", 0), + GPIO_LOOKUP("Bank D", 4, "amp", 0), + { }, + }, +}; + static struct platform_device *jz_platform_devices[] __initdata = { &jz4740_udc_device, &jz4740_udc_xceiv_device, @@ -461,6 +470,8 @@ static int __init qi_lb60_init_platform_devices(void) jz4740_adc_device.dev.platform_data = &qi_lb60_battery_pdata; jz4740_mmc_device.dev.platform_data = &qi_lb60_mmc_pdata; + gpiod_add_lookup_table(&qi_lb60_audio_gpio_table); + jz4740_serial_device_register(); spi_register_board_info(qi_lb60_spi_board_info, -- cgit v1.2.3