mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
NFC: st21nfcb: disable irq when st21nfcb is disabled
When st21nfcb is disabled, the irq line may remain active while no data are available, flooding the system with irrelevant i2c transaction. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Samuel Ortiz <[email protected]>
This commit is contained in:
parent
183fe2d06d
commit
05f0939f76
1 changed files with 4 additions and 4 deletions
|
|
@ -70,6 +70,9 @@ static int st21nfcb_nci_i2c_enable(void *phy_id)
|
|||
gpio_set_value(phy->gpio_reset, 1);
|
||||
usleep_range(80000, 85000);
|
||||
|
||||
if (phy->ndlc->powered == 0)
|
||||
enable_irq(phy->i2c_dev->irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -77,10 +80,7 @@ static void st21nfcb_nci_i2c_disable(void *phy_id)
|
|||
{
|
||||
struct st21nfcb_i2c_phy *phy = phy_id;
|
||||
|
||||
/* reset chip in order to flush clf */
|
||||
gpio_set_value(phy->gpio_reset, 0);
|
||||
usleep_range(10000, 15000);
|
||||
gpio_set_value(phy->gpio_reset, 1);
|
||||
disable_irq_nosync(phy->i2c_dev->irq);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue