From 2aa9d0d63a614051d1fcc4f6713bbf69698a7780 Mon Sep 17 00:00:00 2001 From: Miles Krause Date: Thu, 30 Apr 2026 20:35:45 -0400 Subject: [PATCH 1/6] nfc: trf7970a: fix comment typos Fix a few spelling mistakes in comments. Signed-off-by: Miles Krause Link: https://patch.msgid.link/20260501003548.6838-1-mileskrause5200@gmail.com Signed-off-by: David Heidelberg --- drivers/nfc/trf7970a.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nfc/trf7970a.c b/drivers/nfc/trf7970a.c index 08c27bb438b5..f22e091019de 100644 --- a/drivers/nfc/trf7970a.c +++ b/drivers/nfc/trf7970a.c @@ -61,15 +61,15 @@ * support that. So, if an abort is received before trf7970a_send_cmd() * has sent the command to the tag, it simply returns -ECANCELED. If the * command has already been sent to the tag, then the driver continues - * normally and recieves the response data (or error) but just before + * normally and receives the response data (or error) but just before * sending the data upstream, it frees the rx_skb and sends -ECANCELED * upstream instead. If the command failed, that error will be sent * upstream. * - * When recieving data from a tag and the interrupt status register has + * When receiving data from a tag and the interrupt status register has * only the SRX bit set, it means that all of the data has been received * (once what's in the fifo has been read). However, depending on timing - * an interrupt status with only the SRX bit set may not be recived. In + * an interrupt status with only the SRX bit set may not be received. In * those cases, the timeout mechanism is used to wait 20 ms in case more * data arrives. After 20 ms, it is assumed that all of the data has been * received and the accumulated rx data is sent upstream. The From 5251ffc72996ed9e447ca637db80141627476b09 Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Sun, 10 May 2026 22:12:52 +0200 Subject: [PATCH 2/6] nfc: nci: uart: Constify struct tty_ldisc_ops 'struct tty_ldisc_ops' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig: Before: ====== text data bss dec hex filename 11454 3352 256 15062 3ad6 net/nfc/nci/uart.o After: ===== text data bss dec hex filename 11646 3160 256 15062 3ad6 net/nfc/nci/uart.o Signed-off-by: Christophe JAILLET Link: https://patch.msgid.link/c756755a72cdfde2877a18ddee01eaa4f633c220.1778443960.git.christophe.jaillet@wanadoo.fr Signed-off-by: David Heidelberg --- net/nfc/nci/uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/nfc/nci/uart.c b/net/nfc/nci/uart.c index 5a3aed7f84f5..aa20e8603f32 100644 --- a/net/nfc/nci/uart.c +++ b/net/nfc/nci/uart.c @@ -421,7 +421,7 @@ void nci_uart_set_config(struct nci_uart *nu, int baudrate, int flow_ctrl) } EXPORT_SYMBOL_GPL(nci_uart_set_config); -static struct tty_ldisc_ops nci_uart_ldisc = { +static const struct tty_ldisc_ops nci_uart_ldisc = { .owner = THIS_MODULE, .num = N_NCI, .name = "n_nci", From 791ccc8644b5a062bcc79f3e8f34a09097fb3280 Mon Sep 17 00:00:00 2001 From: Carl Lee Date: Tue, 12 May 2026 17:55:11 +0800 Subject: [PATCH 3/6] nfc: nxp-nci: Add ISO15693 support NXP NCI controllers such as PN7150 support ISO15693 Type 5 tags, but the driver does not currently advertise this protocol. Add NFC_PROTO_ISO15693_MASK so that ISO15693 tags can be detected through the Linux NFC stack. Signed-off-by: Carl Lee Link: https://patch.msgid.link/20260512-nfc-nxp-nci-add-iso15693-support-v1-1-3394e5b9dba9@amd.com Signed-off-by: David Heidelberg --- drivers/nfc/nxp-nci/core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/nfc/nxp-nci/core.c b/drivers/nfc/nxp-nci/core.c index 66b198663387..448e5a4e7338 100644 --- a/drivers/nfc/nxp-nci/core.c +++ b/drivers/nfc/nxp-nci/core.c @@ -25,6 +25,7 @@ NFC_PROTO_FELICA_MASK | \ NFC_PROTO_ISO14443_MASK | \ NFC_PROTO_ISO14443_B_MASK | \ + NFC_PROTO_ISO15693_MASK | \ NFC_PROTO_NFC_DEP_MASK) #define NXP_NCI_RF_PLL_UNLOCKED_NTF nci_opcode_pack(NCI_GID_RF_MGMT, 0x21) From 2d78676b1f9d41c96ad836465ef6a6449fa8cb29 Mon Sep 17 00:00:00 2001 From: Carl Lee Date: Tue, 26 May 2026 09:50:29 +0800 Subject: [PATCH 4/6] nfc: nxp-nci: treat -ENXIO in IRQ thread as no data available The I2C read operation in the IRQ thread may return -ENXIO when the controller has not yet provided data after asserting IRQ. IRQ assertion does not guarantee that data is immediately available on the I2C bus. In such cases, the read request may be NACKed, resulting in -ENXIO. Treat this condition as "no data available yet" and log it at debug level instead of reporting it as a read failure. This avoids misleading error messages during normal operation. Signed-off-by: Carl Lee Link: https://patch.msgid.link/20260526-nfc-nxp-nci-treat-enxio-as-no-data-available-yet-v1-1-305bb11b9147@amd.com Signed-off-by: David Heidelberg --- drivers/nfc/nxp-nci/i2c.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index a6c08175d9dd..1d9d7d6fd542 100644 --- a/drivers/nfc/nxp-nci/i2c.c +++ b/drivers/nfc/nxp-nci/i2c.c @@ -231,6 +231,14 @@ static irqreturn_t nxp_nci_i2c_irq_thread_fn(int irq, void *phy_id) if (info->mode == NXP_NCI_MODE_FW) nxp_nci_fw_recv_frame(phy->ndev, NULL); } + if (r == -ENXIO) { + /* + * -ENXIO may occur if the controller has not yet + * provided data after asserting IRQ. + */ + dev_dbg(&client->dev, "No data available yet\n"); + goto exit_irq_handled; + } if (r < 0) { nfc_err(&client->dev, "Read failed with error %d\n", r); goto exit_irq_handled; From 567ab7727adb81626da7ab4513c15888d0ee2693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20=28The=20Capable=20Hub=29?= Date: Mon, 18 May 2026 15:33:11 +0200 Subject: [PATCH 5/6] nfc: Use named initializers for struct i2c_device_id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. While touching all these arrays, unify usage of whitespace in the list terminator. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260518133311.644160-2-u.kleine-koenig@baylibre.com Signed-off-by: David Heidelberg --- drivers/nfc/microread/i2c.c | 2 +- drivers/nfc/nfcmrvl/i2c.c | 4 ++-- drivers/nfc/nxp-nci/i2c.c | 4 ++-- drivers/nfc/pn533/i2c.c | 4 ++-- drivers/nfc/pn544/i2c.c | 4 ++-- drivers/nfc/s3fwrn5/i2c.c | 4 ++-- drivers/nfc/st-nci/i2c.c | 4 ++-- drivers/nfc/st21nfca/i2c.c | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/nfc/microread/i2c.c b/drivers/nfc/microread/i2c.c index f00cff7f9693..f45e883b8730 100644 --- a/drivers/nfc/microread/i2c.c +++ b/drivers/nfc/microread/i2c.c @@ -276,7 +276,7 @@ static void microread_i2c_remove(struct i2c_client *client) } static const struct i2c_device_id microread_i2c_id[] = { - { MICROREAD_I2C_DRIVER_NAME }, + { .name = MICROREAD_I2C_DRIVER_NAME }, { } }; MODULE_DEVICE_TABLE(i2c, microread_i2c_id); diff --git a/drivers/nfc/nfcmrvl/i2c.c b/drivers/nfc/nfcmrvl/i2c.c index 39ecf2aeda80..66877a7d03f2 100644 --- a/drivers/nfc/nfcmrvl/i2c.c +++ b/drivers/nfc/nfcmrvl/i2c.c @@ -252,8 +252,8 @@ static const struct of_device_id of_nfcmrvl_i2c_match[] __maybe_unused = { MODULE_DEVICE_TABLE(of, of_nfcmrvl_i2c_match); static const struct i2c_device_id nfcmrvl_i2c_id_table[] = { - { "nfcmrvl_i2c" }, - {} + { .name = "nfcmrvl_i2c" }, + { } }; MODULE_DEVICE_TABLE(i2c, nfcmrvl_i2c_id_table); diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index 1d9d7d6fd542..faebc89a7ef5 100644 --- a/drivers/nfc/nxp-nci/i2c.c +++ b/drivers/nfc/nxp-nci/i2c.c @@ -349,8 +349,8 @@ static void nxp_nci_i2c_remove(struct i2c_client *client) } static const struct i2c_device_id nxp_nci_i2c_id_table[] = { - { "nxp-nci_i2c" }, - {} + { .name = "nxp-nci_i2c" }, + { } }; MODULE_DEVICE_TABLE(i2c, nxp_nci_i2c_id_table); diff --git a/drivers/nfc/pn533/i2c.c b/drivers/nfc/pn533/i2c.c index 132c050a365d..94aca9119f0f 100644 --- a/drivers/nfc/pn533/i2c.c +++ b/drivers/nfc/pn533/i2c.c @@ -249,8 +249,8 @@ static const struct of_device_id of_pn533_i2c_match[] __maybe_unused = { MODULE_DEVICE_TABLE(of, of_pn533_i2c_match); static const struct i2c_device_id pn533_i2c_id_table[] = { - { PN533_I2C_DRIVER_NAME }, - {} + { .name = PN533_I2C_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, pn533_i2c_id_table); diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c index b31b5bef7187..dcfa96bd4345 100644 --- a/drivers/nfc/pn544/i2c.c +++ b/drivers/nfc/pn544/i2c.c @@ -44,8 +44,8 @@ PN544_HCI_I2C_LLC_MAX_PAYLOAD) static const struct i2c_device_id pn544_hci_i2c_id_table[] = { - { "pn544" }, - {} + { .name = "pn544" }, + { } }; MODULE_DEVICE_TABLE(i2c, pn544_hci_i2c_id_table); diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c index 91b8d1445efd..e9a34d27a369 100644 --- a/drivers/nfc/s3fwrn5/i2c.c +++ b/drivers/nfc/s3fwrn5/i2c.c @@ -205,8 +205,8 @@ static void s3fwrn5_i2c_remove(struct i2c_client *client) } static const struct i2c_device_id s3fwrn5_i2c_id_table[] = { - { S3FWRN5_I2C_DRIVER_NAME }, - {} + { .name = S3FWRN5_I2C_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, s3fwrn5_i2c_id_table); diff --git a/drivers/nfc/st-nci/i2c.c b/drivers/nfc/st-nci/i2c.c index 416770adbeba..9ae839a6f5cc 100644 --- a/drivers/nfc/st-nci/i2c.c +++ b/drivers/nfc/st-nci/i2c.c @@ -257,8 +257,8 @@ static void st_nci_i2c_remove(struct i2c_client *client) } static const struct i2c_device_id st_nci_i2c_id_table[] = { - { ST_NCI_DRIVER_NAME }, - {} + { .name = ST_NCI_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, st_nci_i2c_id_table); diff --git a/drivers/nfc/st21nfca/i2c.c b/drivers/nfc/st21nfca/i2c.c index 6d7861383806..aa5f4922b6b0 100644 --- a/drivers/nfc/st21nfca/i2c.c +++ b/drivers/nfc/st21nfca/i2c.c @@ -572,8 +572,8 @@ static void st21nfca_hci_i2c_remove(struct i2c_client *client) } static const struct i2c_device_id st21nfca_hci_i2c_id_table[] = { - { ST21NFCA_HCI_DRIVER_NAME }, - {} + { .name = ST21NFCA_HCI_DRIVER_NAME }, + { } }; MODULE_DEVICE_TABLE(i2c, st21nfca_hci_i2c_id_table); From 1b92c1f6d6d87f9ec3c2bef3c68b99b097712f9a Mon Sep 17 00:00:00 2001 From: David Heidelberg Date: Tue, 2 Jun 2026 19:48:46 +0200 Subject: [PATCH 6/6] MAINTAINERS: Update address for David Heidelberg The +nfc postfix is not useful as I thought. Use the default email. Signed-off-by: David Heidelberg --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index eb8cdcc76324..e5f496c0af53 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18886,7 +18886,7 @@ F: drivers/net/net_failover.c F: include/net/net_failover.h NFC SUBSYSTEM -M: David Heidelberg +M: David Heidelberg L: oe-linux-nfc@lists.linux.dev S: Maintained T: git https://codeberg.org/linux-nfc/linux.git