mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 09:51:00 +07:00
NFC: NCI: Add setup handler
Some drivers require special configuration while initializing. This patch adds setup handler for this custom configuration. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
1907299867
commit
86e8586ed5
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user