Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d65777d1 authored by Janusz Krzysztofik's avatar Janusz Krzysztofik Committed by Tony Lindgren
Browse files

ASoC: ams_delta: use GPIO lookup table



Now as the Amstrad Delta board provides GPIO lookup tables, switch from
GPIO numbers to GPIO descriptors and use the table to locate required
GPIO pins.

The card uses two pins, one for jack and the other for voice modem
codec DAI control.

For jack pin, remove hardcoded GPIO number and use GPIO descriptor
based variant of jack GPIO initialization.

For modem_codec pin, declare static variable for storing its GPIO
descriptor, obtain it on card initialization and replace obsolete
ams_delta_latch2_write() with gpiod_set_value().  For that to work,
don't request the modem_codec pin from the board init code anymore.

If the modem_codec GPIO lookup fails, skip initialization of
functionality of the card which depends on its availability.

Pin naming used by the driver should be followed while respective GPIO
lookup table is initialized by a board init code.

Created and tested against linux-4.17-rc3, on top of patch 1/6 "ARM:
OMAP1: ams-delta: add GPIO lookup tables"

Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
Acked-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 04867389
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment