提交 fdf79bd4 编写于 作者: R Robert Baldyga 提交者: Samuel Ortiz

NFC: nci: Add post_setup handler

Some drivers require non-standard configuration after NCI_CORE_INIT
request, because they need to know ndev->manufact_specific_info or
ndev->manufact_id. This patch adds post_setup handler allowing to do
such custom configuration.
Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 aaee24ac
...@@ -79,6 +79,7 @@ struct nci_ops { ...@@ -79,6 +79,7 @@ struct nci_ops {
int (*close)(struct nci_dev *ndev); int (*close)(struct nci_dev *ndev);
int (*send)(struct nci_dev *ndev, struct sk_buff *skb); int (*send)(struct nci_dev *ndev, struct sk_buff *skb);
int (*setup)(struct nci_dev *ndev); int (*setup)(struct nci_dev *ndev);
int (*post_setup)(struct nci_dev *ndev);
int (*fw_download)(struct nci_dev *ndev, const char *firmware_name); int (*fw_download)(struct nci_dev *ndev, const char *firmware_name);
__u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol); __u32 (*get_rfprotocol)(struct nci_dev *ndev, __u8 rf_protocol);
int (*discover_se)(struct nci_dev *ndev); int (*discover_se)(struct nci_dev *ndev);
......
...@@ -388,6 +388,10 @@ static int nci_open_device(struct nci_dev *ndev) ...@@ -388,6 +388,10 @@ static int nci_open_device(struct nci_dev *ndev)
msecs_to_jiffies(NCI_INIT_TIMEOUT)); msecs_to_jiffies(NCI_INIT_TIMEOUT));
} }
if (ndev->ops->post_setup) {
rc = ndev->ops->post_setup(ndev);
}
if (!rc) { if (!rc) {
rc = __nci_request(ndev, nci_init_complete_req, 0, rc = __nci_request(ndev, nci_init_complete_req, 0,
msecs_to_jiffies(NCI_INIT_TIMEOUT)); msecs_to_jiffies(NCI_INIT_TIMEOUT));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册