Re: [PATCH v5 6/9] soundwire: qcom: add support to new interrupts

Vinod Koul
2021-03-30T08:43:54Z

On 26-03-21, 06:39, Srinivas Kandagatla wrote:

> - ctrl->reg_write(ctrl, SWRM_INTERRUPT_CLEAR, sts);
> + do {
> + for (i = 0; i < SWRM_INTERRUPT_MAX; i++) {
> + value = intr_sts_masked & (1 << i);

BIT(i) istead of shifiting?

> + if (!value)
> + continue;
> +
> + switch (value) {
> + case SWRM_INTERRUPT_STATUS_SLAVE_PEND_IRQ:
> + devnum = qcom_swrm_get_alert_slave_dev_num(swrm);
> + if (devnum < 0) {
> + dev_err_ratelimited(swrm->dev,
> + "no slave alert found.spurious interrupt\n");
> + } else {
> + sdw_handle_slave_status(&swrm->bus, swrm->status);
> + }
>
> - if (sts & SWRM_INTERRUPT_STATUS_SPECIAL_CMD_ID_FINISHED)
> - complete(&ctrl->broadcast);
> + break;
> + case SWRM_INTERRUPT_STATUS_NEW_SLAVE_ATTACHED:
> + case SWRM_INTERRUPT_STATUS_CHANGE_ENUM_SLAVE_STATUS:
> + dev_err_ratelimited(swrm->dev, "%s: SWR new slave attached\n",
> + __func__);

This should be debug
--
~Vinod