ir: remove irq affinity in hard decode mode [1/1]

PD#SWPL-9797

Problem:
ir irq is binded to cup 1 and will re-set in every resume process.
cup 0 wakeup first in resume, if there comes a irq during resume in
a critical time it may occurs concurrency.

Solution:
remove irq affinity in hard decode mode and only use it in learning
mode.

Verify:
w400

Change-Id: I26fad9f67665a2bfe9c6d2455559eb1d95e8b2ba
Signed-off-by: Qianggui Song <qianggui.song@amlogic.com>
This commit is contained in:
Qianggui Song
2019-06-25 10:44:29 +08:00
committed by Luke Go
parent d52040136f
commit 1c88be3eb3
3 changed files with 4 additions and 2 deletions

View File

@@ -162,6 +162,8 @@ static long remote_ioctl(struct file *file, unsigned int cmd,
/*backup protocol*/
chip->r_dev->protocol = chip->protocol;
chip->protocol = REMOTE_TYPE_RAW_NEC;
irq_set_affinity(chip->irqno,
cpumask_of(chip->irq_cpumask));
} else {
chip->protocol = chip->r_dev->protocol;
chip->set_register_config(chip, chip->protocol);

View File

@@ -773,7 +773,6 @@ static int ir_hardware_init(struct platform_device *pdev)
goto error_irq;
chip->irq_cpumask = 1;
irq_set_affinity(chip->irqno, cpumask_of(chip->irq_cpumask));
tasklet_enable(&tasklet);
tasklet.data = (unsigned long)chip;
@@ -947,7 +946,6 @@ static int remote_resume(struct device *dev)
}
#endif
irq_set_affinity(chip->irqno, cpumask_of(chip->irq_cpumask));
enable_irq(chip->irqno);
return 0;
}

View File

@@ -362,6 +362,8 @@ static ssize_t ir_learning_store(struct device *dev,
chip->set_register_config(chip, REMOTE_TYPE_RAW_NEC);
r_dev->protocol = chip->protocol;/*backup protocol*/
chip->protocol = REMOTE_TYPE_RAW_NEC;
irq_set_affinity(chip->irqno,
cpumask_of(chip->irq_cpumask));
} else {
chip->protocol = r_dev->protocol;
chip->set_register_config(chip, chip->protocol);