Skip to content
Commit 5c7c343a authored by Howard Mitchell's avatar Howard Mitchell Committed by Mark Brown
Browse files

ASoC: core: Fix volsw_range funcs so SOC_DOUBLE_R_RANGE_TLV works.



This fixes a bug when using the SOC_DOUBLE_R_RANGE_TLV macro in
the invert mode. In the non-invert case, e.g.

SOC_DOUBLE_R_RANGE_TLV("<name>", <reg_l>, <reg_r>,
					0, 40, 255, 0, <tlv>)

the range sent to the hardware is 40..255, but in the invert case:

SOC_DOUBLE_R_RANGE_TLV("<name>", <reg_l>, <reg_r>,
					0, 40, 255, 1, <tlv>)

the range 215..0 was being sent to the hardware. This commit
corrects this to 255..40 so it is consistent with the non-invert
case.

Signed-off-by: default avatarHoward Mitchell <hm@hmbedded.co.uk>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8c8f2f6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment