]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: sun4i-codec: support hp-det-gpios property
authorRyan Walklin <ryan@testtoast.com>
Fri, 14 Feb 2025 22:02:25 +0000 (11:02 +1300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Jun 2025 12:40:06 +0000 (14:40 +0200)
commite472c3d8ad57abe51c4439fc78f63ad7a6a5cde7
tree7a33fc274803750aa072eea1531f2c9f1ace1e3e
parent7fcfed72a51b8cfce7c9c654f4f8399dffb067c5
ASoC: sun4i-codec: support hp-det-gpios property

[ Upstream commit a149377c033afe6557c50892ebbfc0e8b7e2e253 ]

Add support for GPIO headphone detection with the hp-det-gpios
property. In order for this to properly disable the path upon
removal of headphones, the output must be labelled Headphone which
is a common sink in the driver.

Describe a headphone jack and detection GPIO in the driver, check for
a corresponding device tree node, and enable jack detection in a new
machine init function if described.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
--
Changelog v1..v2:
- Separate DAPM changes into separate patch and add rationale.

Tested-by: Philippe Simons <simons.philippe@gmail.com>
Link: https://patch.msgid.link/20250214220247.10810-4-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sunxi/sun4i-codec.c