mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
NFC: Add an shdlc llc module to llc core
This is used by HCI drivers such as the one for the pn544 which require communications between HCI and the chip to use shdlc. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
8af00d48dc
commit
4a61cd6687
@@ -25,6 +25,7 @@
|
||||
#include <linux/skbuff.h>
|
||||
|
||||
#define LLC_NOP_NAME "nop"
|
||||
#define LLC_SHDLC_NAME "shdlc"
|
||||
|
||||
typedef void (*rcv_to_hci_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
|
||||
typedef int (*xmit_to_drv_t) (struct nfc_hci_dev *hdev, struct sk_buff *skb);
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
obj-$(CONFIG_NFC_HCI) += hci.o
|
||||
|
||||
hci-y := core.o hcp.o command.o llc.o llc_nop.o
|
||||
hci-$(CONFIG_NFC_SHDLC) += shdlc.o
|
||||
hci-$(CONFIG_NFC_SHDLC) += shdlc.o llc_shdlc.o
|
||||
|
||||
+15
-1
@@ -26,9 +26,23 @@ static struct list_head llc_engines;
|
||||
|
||||
int nfc_llc_init(void)
|
||||
{
|
||||
int r;
|
||||
|
||||
INIT_LIST_HEAD(&llc_engines);
|
||||
|
||||
return nfc_llc_nop_register();
|
||||
r = nfc_llc_nop_register();
|
||||
if (r)
|
||||
goto exit;
|
||||
|
||||
r = nfc_llc_shdlc_register();
|
||||
if (r)
|
||||
goto exit;
|
||||
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
nfc_llc_exit();
|
||||
return r;
|
||||
}
|
||||
EXPORT_SYMBOL(nfc_llc_init);
|
||||
|
||||
|
||||
@@ -56,5 +56,6 @@ int nfc_llc_register(const char *name, struct nfc_llc_ops *ops);
|
||||
void nfc_llc_unregister(const char *name);
|
||||
|
||||
int nfc_llc_nop_register(void);
|
||||
int nfc_llc_shdlc_register(void);
|
||||
|
||||
#endif /* __LOCAL_LLC_H_ */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user