mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 18:51:21 +02:00
Merge "input: qcom-hv-haptics: ignore flushing FIFO memory during refilling"
This commit is contained in:
commit
fcf2412c86
|
|
@ -1598,7 +1598,7 @@ static int haptics_update_memory_data(struct haptics_chip *chip,
|
|||
}
|
||||
|
||||
static int haptics_update_fifo_samples(struct haptics_chip *chip,
|
||||
u8 *samples, u32 length)
|
||||
u8 *samples, u32 length, bool refill)
|
||||
{
|
||||
int rc;
|
||||
u8 val;
|
||||
|
|
@ -1608,7 +1608,7 @@ static int haptics_update_fifo_samples(struct haptics_chip *chip,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (chip->hw_type == HAP525_HV) {
|
||||
if (chip->hw_type == HAP525_HV && !refill) {
|
||||
val = MEM_FLUSH_RELOAD_BIT;
|
||||
rc = haptics_write(chip, chip->ptn_addr_base,
|
||||
HAP_PTN_MEM_OP_ACCESS_REG, &val, 1);
|
||||
|
|
@ -1858,7 +1858,7 @@ static int haptics_set_fifo(struct haptics_chip *chip, struct fifo_cfg *fifo)
|
|||
return available;
|
||||
|
||||
num = min_t(u32, available, num);
|
||||
rc = haptics_update_fifo_samples(chip, fifo->samples, num);
|
||||
rc = haptics_update_fifo_samples(chip, fifo->samples, num, false);
|
||||
if (rc < 0) {
|
||||
dev_err(chip->dev, "write FIFO samples failed, rc=%d\n", rc);
|
||||
return rc;
|
||||
|
|
@ -3008,7 +3008,7 @@ static irqreturn_t fifo_empty_irq_handler(int irq, void *data)
|
|||
samples = fifo->samples + status->samples_written;
|
||||
|
||||
/* Write more pattern data into FIFO memory. */
|
||||
rc = haptics_update_fifo_samples(chip, samples, num);
|
||||
rc = haptics_update_fifo_samples(chip, samples, num, true);
|
||||
if (rc < 0) {
|
||||
dev_err(chip->dev, "Update FIFO samples failed, rc=%d\n",
|
||||
rc);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user