mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
input: qcom-hv-haptics: limit play rate for PM8350B v1 hardware
Due to a hardware limitation, PM8350B v1 cannot play more than 8 KHz as it has a FIFO size of 104 bytes. Hence limit the play rate for PM8350B v1 to 8 KHz. Change-Id: Ibeabd4c0229a54e2d99023c8fbc5970b1a7a1e64 Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
This commit is contained in:
parent
6679b3b4e6
commit
326c01c11c
|
|
@ -966,6 +966,13 @@ static int haptics_set_fifo(struct haptics_chip *chip, struct fifo_cfg *fifo)
|
|||
return -EBUSY;
|
||||
}
|
||||
|
||||
if (chip->ptn_revision == HAP_PTN_V1 &&
|
||||
fifo->period_per_s > F_8KHZ &&
|
||||
fifo->num_s > MAX_FIFO_SAMPLES(chip)) {
|
||||
dev_err(chip->dev, "PM8350B v1 doesn't support playing long FIFO pattern higher than 8 KHz play rate\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/* Configure FIFO play rate */
|
||||
rc = haptics_set_fifo_playrate(chip, fifo->period_per_s);
|
||||
if (rc < 0)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user