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

Commit ba52c694 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: qti-haptics: Log the current time stamp"

parents f0a96b11 747e72d0
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/debugfs.h>
@@ -956,6 +956,8 @@ static int qti_haptics_playback(struct input_dev *dev, int effect_id, int val)

	dev_dbg(chip->dev, "playback, val = %d\n", val);
	if (!!val) {
		pr_debug("Vibration - on at %lu us\n",
				(unsigned long)ktime_to_us(ktime_get()));
		rc = qti_haptics_module_en(chip, true);
		if (rc < 0)
			return rc;
@@ -985,6 +987,8 @@ static int qti_haptics_playback(struct input_dev *dev, int effect_id, int val)
			}
		}
	} else {
		pr_debug("Vibration - off at %lu us\n",
				(unsigned long)ktime_to_us(ktime_get()));
		play->length_us = 0;
		rc = qti_haptics_play(chip, false);
		if (rc < 0)