]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: codecs: wsa881x: Use proper shutdown GPIO polarity
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Wed, 21 Jan 2026 02:04:22 +0000 (21:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Feb 2026 15:44:21 +0000 (16:44 +0100)
commit3f5a2e7ed2d41790f5f6cac8d72bc2e46680d3a7
tree0bd21ed91c7dc86bd611391dbc07d6ad0bc3d521
parentea366b05b74e40a549f324f335258d93a8f00c56
ASoC: codecs: wsa881x: Use proper shutdown GPIO polarity

[ Upstream commit 738455858a2d21b769f673892546cf8300c9fd78 ]

The shutdown GPIO is active low (SD_N), but this depends on actual board
layout.  Linux drivers should only care about logical state, where high
(1) means shutdown and low (0) means do not shutdown.

Invert the GPIO to match logical value while preserving backwards DTB
compatibility.  It is not possible to detect whether ACTIVE_HIGH flag in
DTB is because it is an old DTB (using incorrect flag) or it is a new
DTB with a correct hardware pin polarity description.  Therefore the
solution prioritizes backwards compatibility while relying on relevant
DTS being upstreamed.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230102114152.297305-4-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Stable-dep-of: 29d71b8a5a40 ("ASoC: codecs: wsa881x: fix unnecessary initialisation")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/wsa881x.c