]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: codec: twl4030: Convert to GPIO descriptors
authorPeng Fan <peng.fan@nxp.com>
Mon, 28 Apr 2025 12:12:47 +0000 (20:12 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 30 Apr 2025 23:23:29 +0000 (08:23 +0900)
commit178c169a30b011971cbbf9c79032b5898b1b07de
tree5f513fdf7cd87494bfc11dc934e177f97dd0c5b2
parent5ae1bd2f6312948231e72cee1022dd6a0c29c7d0
ASoC: codec: twl4030: Convert to GPIO descriptors

of_gpio.h is deprecated, update the driver to use GPIO descriptors.
 - Use of_property_present to check "ti,hs_extmute_gpio" to set hs_extmute
 - if returned value is true.
 - Use devm_gpiod_get_optional to get GPIO descriptor, set consumer name.
 - Use gpiod_set_value to configure output value.

While at here
 - drop remove hook after switching to use devm_gpiod_get_optional
 - Add return value for twl4030_init_chip to propagate value to parent
   in case defer probe happens

Checking the only user logicpd-som-lv.dtsi that uses polarity
GPIO_ACTIVE_HIGH, so all should work as expected.

Cc: Tony Lindgren <tony@atomide.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://patch.msgid.link/20250428-twl4030-v2-2-868d0d572f12@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/twl4030.c