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

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

Merge "msm: sps: add the callback for BAM-level polling"

parents 48c90e19 4e7479f1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2500,6 +2500,7 @@ EXPORT_SYMBOL(sps_pipe_pending_desc);
int sps_bam_process_irq(unsigned long dev)
{
	struct sps_bam *bam;
	int ret = 0;

	if (!dev) {
		SPS_ERR(sps, "sps:%s:BAM handle is NULL.\n", __func__);
@@ -2514,9 +2515,9 @@ int sps_bam_process_irq(unsigned long dev)

	SPS_DBG1(bam, "sps:%s; BAM: %pa.\n", __func__, BAM_ID(bam));

	sps_bam_check_irq(bam);
	ret = sps_bam_check_irq(bam);

	return 0;
	return ret;
}
EXPORT_SYMBOL(sps_bam_process_irq);

+14 −1
Original line number Diff line number Diff line
@@ -143,6 +143,16 @@ polling:
		SPS_DBG1(dev, "sps:bam=%pa;source=0x%x;mask=0x%x.\n",
				BAM_ID(dev), source, mask);

		if ((source == 0) &&
			(dev->props.options & SPS_BAM_RES_CONFIRM)) {
			SPS_DBG2(dev,
				"sps: BAM %pa has no source (source = 0x%x).\n",
				BAM_ID(dev), source);

			spin_unlock_irqrestore(&dev->isr_lock, flags);
			return SPS_ERROR;
		}

		if ((source & (1UL << 31)) && (dev->props.callback)) {
			SPS_DBG1(dev, "sps:bam=%pa;callback for case %d.\n",
				BAM_ID(dev), cb_case);
@@ -231,7 +241,10 @@ static irqreturn_t bam_isr(int irq, void *ctxt)
				SPS_DBG1(dev,
					"sps:bam_isr: handle IRQ for bam:%pa IRQ #:%d.\n",
					BAM_ID(dev), irq);
				sps_bam_check_irq(dev);
				if (sps_bam_check_irq(dev))
					SPS_DBG2(dev,
						"sps:bam_isr: callback bam:%pa IRQ #:%d to poll the pipes.\n",
						BAM_ID(dev), irq);
				dev->props.callback(SPS_CALLBACK_BAM_RES_REL,
							&ready);
			} else {
+1 −0
Original line number Diff line number Diff line
@@ -303,6 +303,7 @@ enum sps_callback_case {
	SPS_CALLBACK_BAM_TIMER_IRQ,	    /* Inactivity timer */
	SPS_CALLBACK_BAM_RES_REQ,	    /* Request resource */
	SPS_CALLBACK_BAM_RES_REL,	    /* Release resource */
	SPS_CALLBACK_BAM_POLL,	            /* To poll each pipe */
};

/*