ASoC: rt5640: switch to GPIO descriptor to honor the polarity
Use devm_gpiod_request_optional() instead of manually parsing the OF
GPIO line. This gives a struct gpio_desc which is preferred over raw
GPIO numbers.
Get rid of the custom GPIO parsing as all of this is done by
devm_gpiod_get_optional(). This changes the behavior in two places:
- the polarity which is passed using device-tree is now honored instead
of assuming "active high" is correct for all boards
- debugfs shows the GPIO name as "realtek,ldo1-en" instead of
"RT5640 LDO1_EN"
Signed-off-by:
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Loading
Please sign in to comment