summaryrefslogtreecommitdiff
path: root/scripts/file-size.sh
diff options
context:
space:
mode:
authorxiongxin <xiongxin@kylinos.cn>2023-12-20 10:29:01 +0800
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-12-21 11:19:01 +0100
commit1cc3542c76acb5f59001e3e562eba672f1983355 (patch)
tree38846eb67f87c514090b172e1ba61bc5d6428ee1 /scripts/file-size.sh
parent1d656bd259edb89dc1d9938ec5c5389867088546 (diff)
gpio: dwapb: mask/unmask IRQ when disable/enale it
In the hardware implementation of the I2C HID driver based on DesignWare GPIO IRQ chip, when the user continues to use the I2C HID device in the suspend process, the I2C HID interrupt will be masked after the resume process is finished. This is because the disable_irq()/enable_irq() of the DesignWare GPIO driver does not synchronize the IRQ mask register state. In normal use of the I2C HID procedure, the GPIO IRQ irq_mask()/irq_unmask() functions are called in pairs. In case of an exception, i2c_hid_core_suspend() calls disable_irq() to disable the GPIO IRQ. With low probability, this causes irq_unmask() to not be called, which causes the GPIO IRQ to be masked and not unmasked in enable_irq(), raising an exception. Add synchronization to the masked register state in the dwapb_irq_enable()/dwapb_irq_disable() function. mask the GPIO IRQ before disabling it. After enabling the GPIO IRQ, unmask the IRQ. Fixes: 7779b3455697 ("gpio: add a driver for the Synopsys DesignWare APB GPIO block") Cc: stable@kernel.org Co-developed-by: Riwen Lu <luriwen@kylinos.cn> Signed-off-by: Riwen Lu <luriwen@kylinos.cn> Signed-off-by: xiongxin <xiongxin@kylinos.cn> Acked-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'scripts/file-size.sh')
0 files changed, 0 insertions, 0 deletions