mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
input: qcom-hv-haptics: move predefined effect preload logging
Move the logging after calculating Vmax so that the right Vmax value can be printed out. CRs-Fixed: 3227145 Change-Id: I17b64f9e3a230058b7e30ca4c30de4d3000d1f87 Signed-off-by: Fenglin Wu <quic_fenglinw@quicinc.com>
This commit is contained in:
parent
65e7bb2861
commit
8afead556c
|
|
@ -2381,9 +2381,6 @@ static int haptics_load_periodic_effect(struct haptics_chip *chip,
|
|||
}
|
||||
|
||||
mutex_lock(&chip->play.lock);
|
||||
dev_dbg(chip->dev, "upload effect %d, vmax_mv=%d\n",
|
||||
chip->effects[i].id, play->vmax_mv);
|
||||
|
||||
if (chip->play.in_calibration) {
|
||||
dev_err(chip->dev, "calibration in progress, ignore playing predefined effect\n");
|
||||
rc = -EBUSY;
|
||||
|
|
@ -2391,6 +2388,7 @@ static int haptics_load_periodic_effect(struct haptics_chip *chip,
|
|||
}
|
||||
|
||||
play->vmax_mv = (magnitude * chip->effects[i].vmax_mv) / 0x7fff;
|
||||
dev_dbg(chip->dev, "upload effect %d, vmax_mv=%d\n", chip->effects[i].id, play->vmax_mv);
|
||||
rc = haptics_load_predefined_effect(chip, &chip->effects[i]);
|
||||
if (rc < 0) {
|
||||
dev_err(chip->dev, "Play predefined effect%d failed, rc=%d\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user