Skip to content

Commit

Permalink
Merge tag 'nfc-next-4.7-1' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/sameo/nfc-next

Samuel Ortiz says:

====================
NFC 4.7 pull request

This is the first NFC pull request for 4.7. With this one we
mainly have:

- Support for NXP's pn532 NFC chipset. The pn532 is based on the same
  microcontroller as the pn533, but it talks to the host through i2c
  instead of USB. By separating the pn533 driver into core and PHY
  parts, we can not add the i2c layer and support the pn532 chipset.

- Support for NCI's loopback mode. This is a testing mode where each
  packet received by the NFCC is sent back to the DH, allowing the
  host to test that the controller can receive and send data.

- A few ACPI related fixes for the STMicro drivers, in order to match
  the device tree naming scheme.

- A bunch of cleanups for the st-nci and the st21nfca STMicro drivers.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 12, 2016
2 parents 6a47a57 + b31d510 commit 631ad4a
Show file tree
Hide file tree
Showing 24 changed files with 1,695 additions and 1,108 deletions.
31 changes: 31 additions & 0 deletions Documentation/devicetree/bindings/net/nfc/pn533-i2c.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
* NXP Semiconductors PN532 NFC Controller

Required properties:
- compatible: Should be "nxp,pn532-i2c" or "nxp,pn533-i2c".
- clock-frequency: I²C work frequency.
- reg: address on the bus
- interrupt-parent: phandle for the interrupt gpio controller
- interrupts: GPIO interrupt to which the chip is connected

Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.

Example (for ARM-based BeagleBone with PN532 on I2C2):

&i2c2 {

status = "okay";

pn532: pn532@24 {

compatible = "nxp,pn532-i2c";

reg = <0x24>;
clock-frequency = <400000>;

interrupt-parent = <&gpio1>;
interrupts = <17 IRQ_TYPE_EDGE_FALLING>;

};
};
11 changes: 1 addition & 10 deletions drivers/nfc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,6 @@
menu "Near Field Communication (NFC) devices"
depends on NFC

config NFC_PN533
tristate "NXP PN533 USB driver"
depends on USB
help
NXP PN533 USB driver.
This driver provides support for NFC NXP PN533 devices.

Say Y here to compile support for PN533 devices into the
kernel or say M to compile it as module (pn533).

config NFC_WILINK
tristate "Texas Instruments NFC WiLink driver"
depends on TI_ST && NFC_NCI
Expand Down Expand Up @@ -70,6 +60,7 @@ config NFC_PORT100

source "drivers/nfc/fdp/Kconfig"
source "drivers/nfc/pn544/Kconfig"
source "drivers/nfc/pn533/Kconfig"
source "drivers/nfc/microread/Kconfig"
source "drivers/nfc/nfcmrvl/Kconfig"
source "drivers/nfc/st21nfca/Kconfig"
Expand Down
2 changes: 1 addition & 1 deletion drivers/nfc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
obj-$(CONFIG_NFC_FDP) += fdp/
obj-$(CONFIG_NFC_PN544) += pn544/
obj-$(CONFIG_NFC_MICROREAD) += microread/
obj-$(CONFIG_NFC_PN533) += pn533.o
obj-$(CONFIG_NFC_PN533) += pn533/
obj-$(CONFIG_NFC_WILINK) += nfcwilink.o
obj-$(CONFIG_NFC_MEI_PHY) += mei_phy.o
obj-$(CONFIG_NFC_SIM) += nfcsim.o
Expand Down
3 changes: 2 additions & 1 deletion drivers/nfc/fdp/fdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ static int fdp_nci_create_conn(struct nci_dev *ndev)
if (r)
return r;

return nci_get_conn_info_by_id(ndev, 0);
return nci_get_conn_info_by_dest_type_params(ndev,
FDP_PATCH_CONN_DEST, NULL);
}

static inline int fdp_nci_get_versions(struct nci_dev *ndev)
Expand Down
1 change: 0 additions & 1 deletion drivers/nfc/nxp-nci/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ MODULE_DEVICE_TABLE(acpi, acpi_id);
static struct i2c_driver nxp_nci_i2c_driver = {
.driver = {
.name = NXP_NCI_I2C_DRIVER_NAME,
.owner = THIS_MODULE,
.acpi_match_table = ACPI_PTR(acpi_id),
.of_match_table = of_match_ptr(of_nxp_nci_i2c_match),
},
Expand Down
27 changes: 27 additions & 0 deletions drivers/nfc/pn533/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
config NFC_PN533
tristate
help
NXP PN533 core driver.
This driver provides core functionality for NXP PN533 NFC devices.

config NFC_PN533_USB
tristate "NFC PN533 device support (USB)"
depends on USB
select NFC_PN533
---help---
This module adds support for the NXP pn533 USB interface.
Select this if your platform is using the USB bus.

If you choose to build a module, it'll be called pn533_usb.
Say N if unsure.

config NFC_PN533_I2C
tristate "NFC PN533 device support (I2C)"
depends on I2C
select NFC_PN533
---help---
This module adds support for the NXP pn533 I2C interface.
Select this if your platform is using the I2C bus.

If you choose to build a module, it'll be called pn533_i2c.
Say N if unsure.
9 changes: 9 additions & 0 deletions drivers/nfc/pn533/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Makefile for PN533 NFC driver
#
pn533_usb-objs = usb.o
pn533_i2c-objs = i2c.o

obj-$(CONFIG_NFC_PN533) += pn533.o
obj-$(CONFIG_NFC_PN533_USB) += pn533_usb.o
obj-$(CONFIG_NFC_PN533_I2C) += pn533_i2c.o
Loading

0 comments on commit 631ad4a

Please sign in to comment.