[PATCH] soundwire: bus: don't clear SDCA_CASCADE bit

Bard Liao posted 1 patch 1 year, 10 months ago
drivers/soundwire/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] soundwire: bus: don't clear SDCA_CASCADE bit
Posted by Bard Liao 1 year, 10 months ago
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

The SDCA_CASCADE bit is a SoundWire 1.2 addition. It is technically in
the DP0_INT register, but SDCA interrupts shall not be handled as part
of the DP0 interrupt processing.

The existing code has clear comments that we don't want to touch the
SDCA_CASCADE bit, but it's actually cleared due to faulty logic dating
from SoundWire 1.0

In theory clearing this bit should have no effect: a cascade bit
remains set while all ORed status are set, but better safe than sorry.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
---
 drivers/soundwire/bus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index f3fec15c3112..05b2db00d9cd 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -1474,7 +1474,7 @@ static int sdw_handle_dp0_interrupt(struct sdw_slave *slave, u8 *slave_status)
 	}
 
 	do {
-		clear = status & ~SDW_DP0_INTERRUPTS;
+		clear = status & ~(SDW_DP0_INTERRUPTS | SDW_DP0_SDCA_CASCADE);
 
 		if (status & SDW_DP0_INT_TEST_FAIL) {
 			dev_err(&slave->dev, "Test fail for port 0\n");
-- 
2.34.1
Re: [PATCH] soundwire: bus: don't clear SDCA_CASCADE bit
Posted by Vinod Koul 1 year, 10 months ago
On Tue, 26 Mar 2024 06:00:21 +0000, Bard Liao wrote:
> The SDCA_CASCADE bit is a SoundWire 1.2 addition. It is technically in
> the DP0_INT register, but SDCA interrupts shall not be handled as part
> of the DP0 interrupt processing.
> 
> The existing code has clear comments that we don't want to touch the
> SDCA_CASCADE bit, but it's actually cleared due to faulty logic dating
> from SoundWire 1.0
> 
> [...]

Applied, thanks!

[1/1] soundwire: bus: don't clear SDCA_CASCADE bit
      commit: b3a6809e623c03371ba51845129cdec3ebb7896e

Best regards,
-- 
~Vinod