diff options
author | Vincent Cuissard <cuissard@marvell.com> | 2015-10-26 10:27:41 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-10-27 04:21:14 +0100 |
commit | b5b3e23e4cace008e1a30e8614a484d14dfd07a1 (patch) | |
tree | 451bd798e76313fb43dc654530374d4b3c6e3d5c /drivers/nfc/nfcmrvl/main.c | |
parent | NFC: nfcmrvl: configure head/tail room values per low level drivers (diff) | |
download | linux-b5b3e23e4cace008e1a30e8614a484d14dfd07a1.tar.xz linux-b5b3e23e4cace008e1a30e8614a484d14dfd07a1.zip |
NFC: nfcmrvl: add i2c driver
This driver adds the support of I2C-based Marvell NFC controller.
Signed-off-by: Vincent Cuissard <cuissard@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/nfcmrvl/main.c')
-rw-r--r-- | drivers/nfc/nfcmrvl/main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/nfc/nfcmrvl/main.c b/drivers/nfc/nfcmrvl/main.c index a24a7ca9f33d..0c27de60a6bd 100644 --- a/drivers/nfc/nfcmrvl/main.c +++ b/drivers/nfc/nfcmrvl/main.c @@ -33,6 +33,9 @@ static int nfcmrvl_nci_open(struct nci_dev *ndev) if (test_and_set_bit(NFCMRVL_NCI_RUNNING, &priv->flags)) return 0; + /* Reset possible fault of previous session */ + clear_bit(NFCMRVL_PHY_ERROR, &priv->flags); + err = priv->if_ops->nci_open(priv); if (err) @@ -226,10 +229,8 @@ EXPORT_SYMBOL_GPL(nfcmrvl_nci_recv_frame); void nfcmrvl_chip_reset(struct nfcmrvl_private *priv) { - /* - * This function does not take care if someone is using the device. - * To be improved. - */ + /* Reset possible fault of previous session */ + clear_bit(NFCMRVL_PHY_ERROR, &priv->flags); if (priv->config.reset_n_io) { nfc_info(priv->dev, "reset the chip\n"); |