提交 86e8586e 编写于 作者: A Amitkumar Karwar 提交者: Samuel Ortiz

NFC: NCI: Add setup handler

Some drivers require special configuration while initializing.
This patch adds setup handler for this custom configuration.
Signed-off-by: NAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: NBing Zhao <bzhao@marvell.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 19072998
......@@ -68,6 +68,7 @@ struct nci_ops {
int (*open)(struct nci_dev *ndev);
int (*close)(struct nci_dev *ndev);
int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
int (*setup)(struct nci_dev *ndev);
};
#define NCI_MAX_SUPPORTED_RF_INTERFACES 4
......
......@@ -301,6 +301,9 @@ static int nci_open_device(struct nci_dev *ndev)
rc = __nci_request(ndev, nci_reset_req, 0,
msecs_to_jiffies(NCI_RESET_TIMEOUT));
if (ndev->ops->setup(ndev))
ndev->ops->setup(ndev);
if (!rc) {
rc = __nci_request(ndev, nci_init_req, 0,
msecs_to_jiffies(NCI_INIT_TIMEOUT));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册