mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +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. Change-Id: I8d916a13685c8d85f1363e7a8bc766aeb4d5e2ba Signed-off-by: Hui Liu <quic_huliu@quicinc.com>
This commit is contained in:
parent
468928c595
commit
cbda83d0be
|
|
@ -2410,9 +2410,6 @@ static int haptics_load_periodic_effect(struct haptics_chip *chip,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
dev_dbg(chip->dev, "upload %s effect %d, vmax=%d\n", primitive ? "primitive" : "predefined",
|
||||
effects[i].id, play->vmax_mv);
|
||||
|
||||
mutex_lock(&chip->play.lock);
|
||||
if (chip->play.in_calibration) {
|
||||
dev_err(chip->dev, "calibration in progress, ignore playing predefined effect\n");
|
||||
|
|
@ -2421,6 +2418,9 @@ static int haptics_load_periodic_effect(struct haptics_chip *chip,
|
|||
}
|
||||
|
||||
play->vmax_mv = (magnitude * effects[i].vmax_mv) / 0x7fff;
|
||||
dev_dbg(chip->dev, "upload %s effect %d, vmax=%d\n", primitive ? "primitive" : "predefined",
|
||||
effects[i].id, play->vmax_mv);
|
||||
|
||||
rc = haptics_load_predefined_effect(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