In order to prevent any NFC feature when NFC is disable and to save power, put the CLF in hibernate mode with RF deactivated. Add the equivalent to enable the NFC feature when opening st21nfcb driver Signed-off-by: Christophe Ricard <christophe-h.ricard@xxxxxx> --- drivers/nfc/st21nfcb/ndlc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c index 3ee22b4..aa1a5fc 100644 --- a/drivers/nfc/st21nfcb/ndlc.c +++ b/drivers/nfc/st21nfcb/ndlc.c @@ -60,15 +60,19 @@ int ndlc_open(struct llt_ndlc *ndlc) /* toggle reset pin */ ndlc->ops->enable(ndlc->phy_id); ndlc->powered = 1; - return 0; + return st21nfcb_nci_set_mode(ndlc->ndev, 1); } EXPORT_SYMBOL(ndlc_open); void ndlc_close(struct llt_ndlc *ndlc) { /* toggle reset pin */ - ndlc->ops->disable(ndlc->phy_id); + ndlc->ops->enable(ndlc->phy_id); + + st21nfcb_nci_set_mode(ndlc->ndev, 0); + ndlc->powered = 0; + ndlc->ops->disable(ndlc->phy_id); } EXPORT_SYMBOL(ndlc_close); -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html