ASoC: codecs: wcd938x: fix kcontrol max values
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tue, 22 Feb 2022 18:32:10 +0000 (18:32 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:17 +0000 (14:23 +0200)
commit363490abe0be17a0e8ac6f54f6332cc6f75abce6
treee110195dea57d588771cd8ce6654ebdbf7cc781b
parentadafea71b49ec4dbc44e0b84ec6eb602004a7a08
ASoC: codecs: wcd938x: fix kcontrol max values

[ Upstream commit b0217519236924f77a8382b4004e43ef8fd0dcbb ]

set "HPH Type" Kcontrol max value of WCD_MBHC_HPH_STEREO instead of UINT_MAX.
set "HPHL/R Impedance" Kcontrols max value to INT_MAX instead of UINT_MAX as
max field is integer type.

Without this patch amixer for these controls will show -1 as max value to userspace.

Fixes: bcee7ed09b8e ("ASoC: codecs: wcd938x: add Multi Button Headset Control support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220222183212.11580-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/codecs/wcd938x.c