Skip to content
Unverified Commit c91d0c2e authored by Artur Weber's avatar Artur Weber Committed by Mark Brown
Browse files

ASoC: samsung: midas_wm1811: Add GPIO-based headset jack detection



Some Samsung devices that use the midas_wm1811 driver use a GPIO-based
method for detecting whether the headset jack is plugged in, as well as
detecting which headset buttons are pressed. There are two GPIOs:
a "headset detect" GPIO responsible for detecting jack insertion, and
a "headset key" GPIO which triggers when a button on the headset is
pressed. The plug type and the button pressed are determined based
on information from an ADC channel. The headset mic is enabled by a
headset mic bias regulator.

Add support for the GPIO-based headset jack detection mechanism,
and make it configurable from the device tree.

This implementation borrows somewhat from the aries_wm8994.c driver,
though there are a few changes to make the code cleaner, and to add
support for DT-based configuration.

Notably, a dependency on IIO is introduced, to accommodate the ADC
reading requirement.

Signed-off-by: default avatarArtur Weber <aweber.kernel@gmail.com>
Link: https://msgid.link/r/20240525-midas-wm1811-gpio-jack-v4-5-f488e03bd8c7@gmail.com
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9da93d49
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment