backports: Add NFC core and drivers
PATCH v2 2/5 backports: Add NFC core and drivers
This grabs NFC core and drivers files from your linux tree. NFC build is disabled for now.
--- backport/Kconfig | 2 ++ backport/Makefile.kernel | 2 ++ copy-list | 16 ++++++++++++++++ dependencies | 4 ++++ 4 files changed, 24 insertions(+)
backport/Kconfig +2 -0
@@ -34,3 +34,5 @@ source drivers/net/ethernet/Kconfig source drivers/ssb/Kconfig source drivers/bcma/Kconfig + +# source net/nfc/Kconfig
backport/Makefile.kernel +2 -0
@@ -22,3 +22,5 @@ obj-$(CPTCFG_BT) += drivers/bluetooth/ obj-$(CPTCFG_SSB) += drivers/ssb/ obj-$(CPTCFG_BCMA) += drivers/bcma/ obj-$(CPTCFG_ETHERNET) += drivers/net/ethernet/ +obj-$(CPTCFG_NFC) += net/nfc/ +obj-$(CPTCFG_NFC) += drivers/nfc/
copy-list +16 -0
@@ -114,3 +114,19 @@ drivers/net/ethernet/broadcom/Kconfig drivers/net/ethernet/broadcom/Makefile drivers/net/ethernet/broadcom/b44.c drivers/net/ethernet/broadcom/b44.h + +# NFC +net/nfc/ +net/nfc/hci/ +net/nfc/llcp/ +net/nfc/nci/ +include/net/nfc/ +include/linux/socket.h +include/uapi/linux/nfc.h +include/uapi/linux/socket.h + +# NFC drivers +drivers/nfc/ +drivers/nfc/microread/ +drivers/nfc/pn544/ +include/linux/platform_data/pn544.h
dependencies +4 -0
@@ -83,3 +83,7 @@ BRCMDBG 2.6.30 # backport it, but I can't test that and this is a # lot easier right now. BT_HIDP 2.6.33 + +# NFC core needs PF_NFC defined in socket.h which was +# only introduced in kernel 3.1 +NFC 3.1
Signature · 1 line
1.7.10.4
Quoted 1 line · Thierry Escande
NFC build is disabled for now.
Why not just put all of this in after patch 3? The system will ignore patches that can't be applied anyway :)
dependencies BRCMDBG 2.6.30 · line 89
Quoted 3 lines
dependencies +3
-0+# NFC core needs PF_NFC defined in socket.h which was +# only introduced in kernel 3.1 +NFC 3.1
Just PF_NFC could be defined in compat, no?
johannes
Quoted 5 lines · Johannes Berg
dependencies BRCMDBG 2.6.30 · line 89
Quoted 3 lines
dependencies +3
-0+# NFC core needs PF_NFC defined in socket.h which was +# only introduced in kernel 3.1 +NFC 3.1Just
PF_NFCcould be defined in compat, no?
That's right for compilation but sock_register for PF_NFC will fail and the module won't load.
Thierry
Quoted 8 lines · Thierry Escande
Quoted 5 lines · Johannes Berg
dependencies BRCMDBG 2.6.30 · line 89
Quoted 3 lines
dependencies +3
-0+# NFC core needs PF_NFC defined in socket.h which was +# only introduced in kernel 3.1 +NFC 3.1Just
PF_NFCcould be defined in compat, no?That's right for compilation but
sock_registerforPF_NFCwill fail and the module won't load.
Ok.
johannes
Quoted 16 lines · Thierry Escande
This grabs NFC core and drivers files from your linux tree. NFC build is disabled for now.
Signed-off-by Thierry Escande <[email protected]>--- backport/Kconfig | 2 ++ backport/Makefile.kernel | 2 ++ copy-list | 16 ++++++++++++++++ dependencies | 4 ++++ 4 files changed, 24 insertions(+)backport/Kconfig +0
-0
backport/Kconfig source drivers/net/ethernet/Kconfig · line 38
Quoted 5 lines
backport/Kconfig +2
-0@@ -34,3 +34,5 @@ source drivers/net/ethernet/Kconfig source drivers/ssb/Kconfig source drivers/bcma/Kconfig + +# source net/nfc/Kconfig
Instead of adding this here you should better add this Kconfig and Makefile related changes in "build: enable NFC build" and here just the copy-list.
Quoted 18 lines
backport/Makefile.kernel +2
-0@@ -22,3 +22,5 @@ obj-$(CPTCFG_BT) += drivers/bluetooth/ obj-$(CPTCFG_SSB) += drivers/ssb/ obj-$(CPTCFG_BCMA) += drivers/bcma/ obj-$(CPTCFG_ETHERNET) += drivers/net/ethernet/ +obj-$(CPTCFG_NFC) += net/nfc/ +obj-$(CPTCFG_NFC) += drivers/nfc/copy-list +0
-0@@ -114,3 +114,19 @@ drivers/net/ethernet/broadcom/Kconfig drivers/net/ethernet/broadcom/Makefile drivers/net/ethernet/broadcom/b44.c drivers/net/ethernet/broadcom/b44.h
copy-list drivers/net/ethernet/broadcom/Kconfig · line 126
Quoted 10 lines
copy-list +10
-0+ +# NFC +net/nfc/ +net/nfc/hci/ +net/nfc/llcp/ +net/nfc/nci/ +include/net/nfc/ +include/linux/socket.h +include/uapi/linux/nfc.h +include/uapi/linux/socket.h
include/uapi/linux/socket.h contains headers for kernel internal apis which are not backported, do not copy the header into backports when you do not add the implementation of the defined functions in backports, which you probably do not want.
Quoted 19 lines
copy-list +6
-0+ +# NFC drivers +drivers/nfc/ +drivers/nfc/microread/ +drivers/nfc/pn544/ +include/linux/platform_data/pn544.hdependencies +4
-0@@ -83,3 +83,7 @@ BRCMDBG 2.6.30 # backport it, but I can't test that and this is a # lot easier right now. BT_HIDP 2.6.33 + +# NFC core needs PF_NFC defined in socket.h which was +# only introduced in kernel 3.1 +NFC 3.1
Quoted 5 lines · Hauke Mehrtens
include/uapi/linux/socket.hcontains headers for kernel internal apis which are not backported, do not copy the header into backports when you do not add the implementation of the defined functions in backports, which you probably do not want.
include/linux/socket.h is not needed actually Just need to add SOL_NFC definition in compat-3.10.h
Thierry