Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4712e603 authored by Patrick Lai's avatar Patrick Lai Committed by Phani Kumar Uppalapati
Browse files

soundwire: rate limit soundwire command error interrupt



When soundwire reports command error, recommendation is to
flush command fifo. However, it was found that command
error interrupt continues to arrive rapidly and error
messages litter the kernel logs. Update to limit
the rate of printing soundwire command error messages

Change-Id: Ic9cce8457a1b8f9a524bad55672655e57606fc96
Signed-off-by: default avatarPatrick Lai <plai@codeaurora.org>
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent cbd32df3
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -844,7 +844,7 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
			}
			break;
		case SWRM_INTERRUPT_STATUS_MASTER_CLASH_DET:
			dev_err(swrm->dev, "SWR bus clash detected\n");
			dev_err_ratelimited(swrm->dev, "SWR bus clash detected\n");
			break;
		case SWRM_INTERRUPT_STATUS_RD_FIFO_OVERFLOW:
			dev_dbg(swrm->dev, "SWR read FIFO overflow\n");
@@ -857,8 +857,8 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
			break;
		case SWRM_INTERRUPT_STATUS_CMD_ERROR:
			value = swrm->read(swrm->handle, SWRM_CMD_FIFO_STATUS);
			dev_err(swrm->dev,
			"SWR CMD error, CMD fifo status 0x%x, flushing fifo\n",
			dev_err_ratelimited(swrm->dev,
			"SWR CMD error, fifo status 0x%x, flushing fifo\n",
					    value);
			swrm->write(swrm->handle, SWRM_CMD_FIFO_CMD, 0x1);
			break;
@@ -884,7 +884,7 @@ static irqreturn_t swr_mstr_interrupt(int irq, void *dev)
		case SWRM_INTERRUPT_STATUS_CLK_STOP_FINISHED:
			break;
		default:
			dev_err(swrm->dev, "SWR unkown interrupt\n");
			dev_err_ratelimited(swrm->dev, "SWR unknown interrupt\n");
			ret = IRQ_NONE;
			break;
		}