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

Commit 6f9a94c8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "soc: swr-mstr: Avoid handling redundant swr wakeup events"

parents 38db8226 cd61c6ef
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1506,8 +1506,10 @@ static int swrm_event_notify(struct notifier_block *self,
		schedule_work(&(swrm->dc_presence_work));
		break;
	case SWR_WAKE_IRQ_EVENT:
		if (swrm->wakeup_req)
		if (swrm->wakeup_req && !swrm->wakeup_triggered) {
			swrm->wakeup_triggered = true;
			schedule_work(&swrm->wakeup_work);
		}
		break;
	default:
		dev_err(swrm->dev, "%s: invalid event type: %lu\n",
@@ -1935,9 +1937,11 @@ static int swrm_runtime_suspend(struct device *dev)
			swrm_cmd_fifo_wr_cmd(swrm, 0x2, 0xF, 0xF,
					SWRS_SCP_CONTROL);
			usleep_range(100, 105);
			if (swrm->wakeup_req)
			if (swrm->wakeup_req) {
				msm_aud_evt_blocking_notifier_call_chain(
					SWR_WAKE_IRQ_REGISTER, (void *)swrm);
				swrm->wakeup_triggered = false;
			}
		}
		swrm_clk_request(swrm, false);
	}
+1 −1
Original line number Diff line number Diff line
@@ -150,8 +150,8 @@ struct swr_mstr_ctrl {
	u32 clk_stop_mode0_supp;
	struct work_struct wakeup_work;
	u32 wakeup_req;

	bool dev_up;
	bool wakeup_triggered;
};

#endif /* _SWR_WCD_CTRL_H */