void ndlc_close(struct llt_ndlc *ndlc)
{
+ struct nci_mode_set_cmd cmd;
+
+ cmd.cmd_type = ST21NFCB_NCI_SET_NFC_MODE;
+ cmd.mode = 0;
+
/* toggle reset pin */
- ndlc->ops->disable(ndlc->phy_id);
+ ndlc->ops->enable(ndlc->phy_id);
+
+ nci_prop_cmd(ndlc->ndev, ST21NFCB_NCI_CORE_PROP,
+ sizeof(struct nci_mode_set_cmd), (__u8 *)&cmd);
+
ndlc->powered = 0;
+ ndlc->ops->disable(ndlc->phy_id);
}
EXPORT_SYMBOL(ndlc_close);
#define ST21NFCB_NCI1_X_PROPRIETARY_ISO15693 0x83
+static int st21nfcb_nci_init(struct nci_dev *ndev)
+{
+ struct nci_mode_set_cmd cmd;
+
+ cmd.cmd_type = ST21NFCB_NCI_SET_NFC_MODE;
+ cmd.mode = 1;
+
+ return nci_prop_cmd(ndev, ST21NFCB_NCI_CORE_PROP,
+ sizeof(struct nci_mode_set_cmd), (__u8 *)&cmd);
+}
+
static int st21nfcb_nci_open(struct nci_dev *ndev)
{
struct st21nfcb_nci_info *info = nci_get_drvdata(ndev);
};
static struct nci_ops st21nfcb_nci_ops = {
+ .init = st21nfcb_nci_init,
.open = st21nfcb_nci_open,
.close = st21nfcb_nci_close,
.send = st21nfcb_nci_send,
#define ST21NFCB_NCI_RUNNING 1
#define ST21NFCB_NCI_CORE_PROP 0x01
+#define ST21NFCB_NCI_SET_NFC_MODE 0x02
+
+struct nci_mode_set_cmd {
+ u8 cmd_type;
+ u8 mode;
+} __packed;
struct nci_mode_set_rsp {
u8 status;