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:
Samuel Ortiz
2013-04-30 23:48:50 +02:00
parent d999e4db0a
commit 73f3adb9b9
3 changed files with 19 additions and 26 deletions

View File

@@ -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;