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

Commit 2b73670c authored by Fenglin Wu's avatar Fenglin Wu
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 31afc3e1
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -744,6 +744,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;
	}

@@ -966,10 +969,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);