ASoC: tlv320aic3x: switch to using gpiod API
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 2 Nov 2022 23:20:04 +0000 (16:20 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 3 Nov 2022 13:26:13 +0000 (13:26 +0000)
commita984d8332d90afd2989e10b095ffdb2875d4bac8
treef8956f2a9052a81a88bd96cf19d125f42f4356e1
parent426c7bf45f207ac7a962e012dd482f7aaa3a3d5f
ASoC: tlv320aic3x: switch to using gpiod API

Switch the driver from legacy gpio API that is deprecated to the newer
gpiod API that respects line polarities described in ACPI/DT.

The driver still tries to support shared reset lines, by first trying to
allocate the reset GPIO normally, and then non-exclusively, although the
utility of such support is questionable, toggling reset line from one
driver/instance will result in all chips being reset, potentially at an
inopportune moment.

Note that this change depends on commit fbbbcd177a27 ("gpiolib: of: add
quirk for locating reset lines with legacy bindings") to translate
request for "reset" GPIO to the legacy name "gpio-reset" in case when
proper name is not used.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://lore.kernel.org/r/20221102232004.1721864-3-dmitry.torokhov@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320aic3x.c