diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-09-08 16:45:15 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-10 08:51:04 +0300 |
commit | 2acd30b9f6032c6cbefc5e255c17ebbb0718e56a (patch) | |
tree | 320e2872137922f70f1a2a4c260cfdbee5245eac /drivers/soundwire | |
parent | 09309093d5e8f8774e4a3a0d42b73cf47e9421cf (diff) | |
download | linux-2acd30b9f6032c6cbefc5e255c17ebbb0718e56a.tar.xz |
ASoC/soundwire: bus: use property to set interrupt masks
Add a slave-level property and program the SCP_INT1_MASK as desired by
the codec driver. Since there is no DisCo property this has to be an
implementation-specific firmware property or hard-coded in the driver.
The only functionality change is that implementation-defined
interrupts are no longer set for amplifiers - those interrupts are
typically for jack detection or acoustic event detection/hotwording.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200908134521.6781-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r-- | drivers/soundwire/bus.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index d808f0256ba0..9f4cc24ccea3 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -1184,13 +1184,13 @@ static int sdw_initialize_slave(struct sdw_slave *slave) return ret; /* - * Set bus clash, parity and SCP implementation - * defined interrupt mask - * TODO: Read implementation defined interrupt mask - * from Slave property + * Set SCP_INT1_MASK register, typically bus clash and + * implementation-defined interrupt mask. The Parity detection + * may not always be correct on startup so its use is + * device-dependent, it might e.g. only be enabled in + * steady-state after a couple of frames. */ - val = SDW_SCP_INT1_IMPL_DEF | SDW_SCP_INT1_BUS_CLASH | - SDW_SCP_INT1_PARITY; + val = slave->prop.scp_int1_mask; /* Enable SCP interrupts */ ret = sdw_update(slave, SDW_SCP_INTMASK1, val, val); |