Skip to content
Commit 3653bc81 authored by Martin Blumenstingl's avatar Martin Blumenstingl
Browse files

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: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
parent ad16780c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment