diff options
author | Christophe Ricard <christophe.ricard@gmail.com> | 2015-06-06 13:16:50 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2015-06-09 00:34:25 +0200 |
commit | 183fe2d06dba2f45ae47360cdb911f95551917ed (patch) | |
tree | 6bb971b0e7ee8695cbb0d8f12f30e6eef9329521 /drivers/nfc/st21nfcb/ndlc.c | |
parent | e8b72c205e5e02b6574be1e83c0c8c99335f8288 (diff) | |
download | op-kernel-dev-183fe2d06dba2f45ae47360cdb911f95551917ed.zip op-kernel-dev-183fe2d06dba2f45ae47360cdb911f95551917ed.tar.gz |
NFC: st21nfcb: Move powered flag from phy to ndlc layer
The powered flag can be set from the ndlc_open and ndlc_close layer.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/nfc/st21nfcb/ndlc.c')
-rw-r--r-- | drivers/nfc/st21nfcb/ndlc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/nfc/st21nfcb/ndlc.c b/drivers/nfc/st21nfcb/ndlc.c index 429cf05..3ee22b4 100644 --- a/drivers/nfc/st21nfcb/ndlc.c +++ b/drivers/nfc/st21nfcb/ndlc.c @@ -59,6 +59,7 @@ int ndlc_open(struct llt_ndlc *ndlc) { /* toggle reset pin */ ndlc->ops->enable(ndlc->phy_id); + ndlc->powered = 1; return 0; } EXPORT_SYMBOL(ndlc_open); @@ -67,6 +68,7 @@ void ndlc_close(struct llt_ndlc *ndlc) { /* toggle reset pin */ ndlc->ops->disable(ndlc->phy_id); + ndlc->powered = 0; } EXPORT_SYMBOL(ndlc_close); @@ -262,6 +264,7 @@ int ndlc_probe(void *phy_id, struct nfc_phy_ops *phy_ops, struct device *dev, ndlc->ops = phy_ops; ndlc->phy_id = phy_id; ndlc->dev = dev; + ndlc->powered = 0; *ndlc_id = ndlc; |