Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: fsl_sai: fix getting version from VERID

The version information is at the bit31 ~ bit16 in the VERID
register, so need to right shift 16bit to get it, otherwise
the result of comparison "sai->verid.version >= 0x0301" is
wrong.

Fixes: 99c1e74f25d4 ("ASoC: fsl_sai: store full version instead of major/minor")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/1675760664-25193-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Shengjiu Wang and committed by
Mark Brown
29aab388 95ff4aad

+1
+1
sound/soc/fsl/fsl_sai.c
··· 1141 1141 1142 1142 sai->verid.version = val & 1143 1143 (FSL_SAI_VERID_MAJOR_MASK | FSL_SAI_VERID_MINOR_MASK); 1144 + sai->verid.version >>= FSL_SAI_VERID_MINOR_SHIFT; 1144 1145 sai->verid.feature = val & FSL_SAI_VERID_FEATURE_MASK; 1145 1146 1146 1147 ret = regmap_read(sai->regmap, FSL_SAI_PARAM, &val);