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

Commit c0be83b0 authored by Fenglin Wu's avatar Fenglin Wu Committed by Gerrit - the friendly Code Review server
Browse files

input: qti-haptics: Clear PLAY bit after all pattern is played



Clear the PLAY bit only after all pattern bytes are queued to make sure
the whole pattern can be played successfully.

Change-Id: I891e5e46168420c6e4963d67bc77c0f79b2a4a8c
Signed-off-by: default avatarFenglin Wu <fenglinw@codeaurora.org>
parent b1f826d2
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -748,6 +748,9 @@ static irqreturn_t qti_haptics_play_irq_handler(int irq, void *data)
			chip->play_irq_en = false;
		}

		/* Clear PLAY after all pattern bytes are queued */
		qti_haptics_play(chip, false);

		goto handled;
	}

@@ -959,10 +962,6 @@ static int qti_haptics_playback(struct input_dev *dev, int effect_id, int val)
				enable_irq(chip->play_irq);
				chip->play_irq_en = true;
			}
			/* Toggle PLAY when playing pattern */
			rc = qti_haptics_play(chip, false);
			if (rc < 0)
				return rc;
		} else {
			if (chip->play_irq_en) {
				disable_irq_nosync(chip->play_irq);