Skip to contentSkip to conversation

backports: Add NFC core and drivers

PATCH Superseded Thierry Escande 3 participants 6 messages Apr 5, 2013

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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
index d0ae17f..87e3869 100644
@@ -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
index a599ad7..ac58225 100644
@@ -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
index 4243619..82e21b1 100644
@@ -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
index 7c79449..e9aaa2e 100644
@@ -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
#1 lore raw
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

#2 lore raw
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.1

Just PF_NFC could 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

#3 lore raw
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.1

Just PF_NFC could be defined in compat, no?

That's right for compilation but sock_register for PF_NFC will fail and the module won't load.

Ok.

johannes

#4 lore raw
In reply to Thierry Escande
Quoted 16 lines · Thierry Escande

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 +0 -0
index d0ae17f..87e3869 100644

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
index a599ad7..ac58225 100644
@@ -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
index 4243619..82e21b1 100644
@@ -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.h
dependencies +4 -0
index 7c79449..e9aaa2e 100644
@@ -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
#5 lore raw
Quoted 5 lines · Hauke Mehrtens

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.

include/linux/socket.h is not needed actually Just need to add SOL_NFC definition in compat-3.10.h

Thierry