Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 86e8586e authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Samuel Ortiz
Browse files

NFC: NCI: Add setup handler



Some drivers require special configuration while initializing.
This patch adds setup handler for this custom configuration.

Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 19072998
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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
+3 −0
Original line number Diff line number Diff line
@@ -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));