]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ASoC: samsung: midas-audio: Add GPIO-based headset
authorMark Brown <broonie@kernel.org>
Wed, 29 May 2024 15:32:22 +0000 (16:32 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 29 May 2024 15:32:22 +0000 (16:32 +0100)
commit52100401c17b8827c185c8b44fe473a3d9421836
treefd59cfe11c54e4c16d3273e72954b1f46211044b
parente80613d6a6d528a265411556b0a84596fdc39959
parent255009d22c185623140de600a5fb54f0fd541bb8
ASoC: samsung: midas-audio: Add GPIO-based headset

Merge series from Artur Weber <aweber.kernel@gmail.com>:

Many of Samsung's Exynos 4 devices share the same midas-audio driver
to handle the codec setup. While most of these devices, including the
Midas itself, use the jack detection provided by the WM8994 driver,
other devices such as the Samsung Galaxy Tab 3 8.0 (lt01) use two GPIOs
and an ADC channel to determine jack insertion, the jack's type, and
button presses (for headsets with volume up/down/play buttons).

In the downstream kernel, this behavior is implemented in the sec-jack
driver[1], and the per-device settings are configured in *-jack.c files
in the mach folder (see e.g. the Tab 3's implementation[2]).

This patchset implements this mechanism in the midas_wm1811.c driver,
and adds new DTS options to allow for its configuration. It also
enables jack detection for the Samsung Galaxy Tab 3 8.0.

A very similar mechanism was already present in the aries_wm8994.c
driver[3]; this implementation heavily borrows from it, though there
are a few extra cleanups as well.