]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: fsl_ssi: serialize AC'97 register access operations
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Mon, 20 Nov 2017 22:16:07 +0000 (23:16 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Nov 2017 16:43:43 +0000 (16:43 +0000)
commitb880b8056b31288323745a13930bc45cf4c86e9d
treef249f5077bd7d905f0d837a7916a499d8fe38def
parent695b78b548d8a26288f041e907ff17758df9e1d5
ASoC: fsl_ssi: serialize AC'97 register access operations

AC'97 register access operations (both read and write) on SSI use a one,
shared set of SSI registers for AC'97 register address and data.
This means that only one such access is possible at a time and so all these
operations need to be serialized.

Since an AC'97 register access operation in this driver takes 100us+ let's
use a mutex for this.

Use this opportunity to also change a default value returned from AC'97
register read function from -1 to 0, since that's what AC'97 specs require
to be returned when unknown / undefined registers are read.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_ssi.c