NFC: mei_phy: Register event callback when enabling the device
The callback registration starts a waiting read, so it needs to be fired everytime the device is enabled. Otherwise following writes will never get an answer back. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
@@ -64,6 +64,15 @@ int nfc_mei_phy_enable(void *phy_id)
|
||||
return r;
|
||||
}
|
||||
|
||||
r = mei_cl_register_event_cb(phy->device, nfc_mei_event_cb, phy);
|
||||
if (r) {
|
||||
pr_err("MEY_PHY: Event cb registration failed\n");
|
||||
mei_cl_disable_device(phy->device);
|
||||
phy->powered = 0;
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
phy->powered = 1;
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user