Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 283131d2 authored by David S. Miller's avatar David S. Miller
Browse files


Samuel Ortiz says:

====================
NFC 4.13 pull request

This is the NFC pull requesy for 4.13. We have:

- A conversion to unified device and GPIO APIs for the
  fdp, pn544, and st{21,-nci} drivers.
- A fix for NFC device IDs allocation.
- A fix for the nfcmrvl driver firmware download mechanism.
- A trf7970a DT and GPIO cleanup and clock setting fix.
- A few fixes for potential overflows in the digital and LLCP code.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9d46b770 bd751808
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -13,14 +13,10 @@ Optional SoC Specific Properties:
- pinctrl-names: Contains only one value - "default".
- pintctrl-0: Specifies the pin control groups used for this controller.
- autosuspend-delay: Specify autosuspend delay in milliseconds.
- vin-voltage-override: Specify voltage of VIN pin in microvolts.
- irq-status-read-quirk: Specify that the trf7970a being used has the
  "IRQ Status Read" erratum.
- en2-rf-quirk: Specify that the trf7970a being used has the "EN2 RF"
  erratum.
- t5t-rmb-extra-byte-quirk: Specify that the trf7970a has the erratum
  where an extra byte is returned by Read Multiple Block commands issued
  to Type 5 tags.
- vdd-io-supply: Regulator specifying voltage for vdd-io
- clock-frequency: Set to specify that the input frequency to the trf7970a is 13560000Hz or 27120000Hz

@@ -37,15 +33,13 @@ Example (for ARM-based BeagleBone with TRF7970A on SPI1):
		spi-max-frequency = <2000000>;
		interrupt-parent = <&gpio2>;
		interrupts = <14 0>;
		ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_LOW>,
				  <&gpio2 5 GPIO_ACTIVE_LOW>;
		ti,enable-gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>,
				  <&gpio2 5 GPIO_ACTIVE_HIGH>;
		vin-supply = <&ldo3_reg>;
		vin-voltage-override = <5000000>;
		vdd-io-supply = <&ldo2_reg>;
		autosuspend-delay = <30000>;
		irq-status-read-quirk;
		en2-rf-quirk;
		t5t-rmb-extra-byte-quirk;
		clock-frequency = <27120000>;
		status = "okay";
	};
+8 −3
Original line number Diff line number Diff line
@@ -9082,9 +9082,6 @@ F: include/uapi/linux/nfc.h
F:	drivers/nfc/
F:	include/linux/platform_data/nfcmrvl.h
F:	include/linux/platform_data/nxp-nci.h
F:	include/linux/platform_data/pn544.h
F:	include/linux/platform_data/st21nfca.h
F:	include/linux/platform_data/st-nci.h
F:	Documentation/devicetree/bindings/net/nfc/

NFS, SUNRPC, AND LOCKD CLIENTS
@@ -11419,6 +11416,14 @@ F: kernel/time/alarmtimer.c
F:	kernel/time/ntp.c
F:	tools/testing/selftests/timers/

TI TRF7970A NFC DRIVER
M:	Mark Greer <mgreer@animalcreek.com>
L:	linux-wireless@vger.kernel.org
L:	linux-nfc@lists.01.org (moderated for non-subscribers)
S:	Supported
F:	drivers/nfc/trf7970a.c
F:	Documentation/devicetree/bindings/net/nfc/trf7970a.txt

SC1200 WDT DRIVER
M:	Zwane Mwaikambo <zwanem@gmail.com>
S:	Maintained
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ menu "Near Field Communication (NFC) devices"

config NFC_TRF7970A
	tristate "Texas Instruments TRF7970a NFC driver"
	depends on SPI && NFC_DIGITAL
	depends on SPI && NFC_DIGITAL && GPIOLIB
	help
	  This option enables the NFC driver for Texas Instruments' TRF7970a
	  device. Such device supports 5 different protocols: ISO14443A,
+4 −11
Original line number Diff line number Diff line
@@ -749,11 +749,9 @@ int fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,
	u32 protocols;
	int r;

	info = kzalloc(sizeof(struct fdp_nci_info), GFP_KERNEL);
	if (!info) {
		r = -ENOMEM;
		goto err_info_alloc;
	}
	info = devm_kzalloc(dev, sizeof(struct fdp_nci_info), GFP_KERNEL);
	if (!info)
		return -ENOMEM;

	info->phy = phy;
	info->phy_ops = phy_ops;
@@ -775,8 +773,7 @@ int fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,
				   tx_tailroom);
	if (!ndev) {
		nfc_err(dev, "Cannot allocate nfc ndev\n");
		r = -ENOMEM;
		goto err_alloc_ndev;
		return -ENOMEM;
	}

	r = nci_register_device(ndev);
@@ -792,9 +789,6 @@ int fdp_nci_probe(struct fdp_i2c_phy *phy, struct nfc_phy_ops *phy_ops,

err_regdev:
	nci_free_device(ndev);
err_alloc_ndev:
	kfree(info);
err_info_alloc:
	return r;
}
EXPORT_SYMBOL(fdp_nci_probe);
@@ -808,7 +802,6 @@ void fdp_nci_remove(struct nci_dev *ndev)

	nci_unregister_device(ndev);
	nci_free_device(ndev);
	kfree(info);
}
EXPORT_SYMBOL(fdp_nci_remove);

+19 −19
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@

#define FDP_I2C_DRIVER_NAME	"fdp_nci_i2c"

#define FDP_DP_POWER_GPIO_NAME	"power"
#define FDP_DP_CLOCK_TYPE_NAME	"clock-type"
#define FDP_DP_CLOCK_FREQ_NAME	"clock-freq"
#define FDP_DP_FW_VSC_CFG_NAME	"fw-vsc-cfg"
@@ -281,8 +280,14 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev,
		*clock_type, *clock_freq, *fw_vsc_cfg != NULL ? "yes" : "no");
}

static int fdp_nci_i2c_probe(struct i2c_client *client,
			     const struct i2c_device_id *id)
static const struct acpi_gpio_params power_gpios = { 0, 0, false };

static const struct acpi_gpio_mapping acpi_fdp_gpios[] = {
	{ "power-gpios", &power_gpios, 1 },
	{},
};

static int fdp_nci_i2c_probe(struct i2c_client *client)
{
	struct fdp_i2c_phy *phy;
	struct device *dev = &client->dev;
@@ -304,8 +309,7 @@ static int fdp_nci_i2c_probe(struct i2c_client *client,
		return -ENODEV;
	}

	phy = devm_kzalloc(dev, sizeof(struct fdp_i2c_phy),
			   GFP_KERNEL);
	phy = devm_kzalloc(dev, sizeof(struct fdp_i2c_phy), GFP_KERNEL);
	if (!phy)
		return -ENOMEM;

@@ -313,7 +317,8 @@ static int fdp_nci_i2c_probe(struct i2c_client *client,
	phy->next_read_size = FDP_NCI_I2C_MIN_PAYLOAD;
	i2c_set_clientdata(client, phy);

	r = request_threaded_irq(client->irq, NULL, fdp_nci_i2c_irq_thread_fn,
	r = devm_request_threaded_irq(dev, client->irq,
				      NULL, fdp_nci_i2c_irq_thread_fn,
				      IRQF_TRIGGER_RISING | IRQF_ONESHOT,
				      FDP_I2C_DRIVER_NAME, phy);

@@ -322,10 +327,12 @@ static int fdp_nci_i2c_probe(struct i2c_client *client,
		return r;
	}

	/* Requesting the power gpio */
	phy->power_gpio = devm_gpiod_get(dev, FDP_DP_POWER_GPIO_NAME,
					 GPIOD_OUT_LOW);
	r = devm_acpi_dev_add_driver_gpios(dev, acpi_fdp_gpios);
	if (r)
		dev_dbg(dev, "Unable to add GPIO mapping table\n");

	/* Requesting the power gpio */
	phy->power_gpio = devm_gpiod_get(dev, "power", GPIOD_OUT_LOW);
	if (IS_ERR(phy->power_gpio)) {
		nfc_err(dev, "Power GPIO request failed\n");
		return PTR_ERR(phy->power_gpio);
@@ -360,12 +367,6 @@ static int fdp_nci_i2c_remove(struct i2c_client *client)
	return 0;
}

static struct i2c_device_id fdp_nci_i2c_id_table[] = {
	{"int339a", 0},
	{}
};
MODULE_DEVICE_TABLE(i2c, fdp_nci_i2c_id_table);

static const struct acpi_device_id fdp_nci_i2c_acpi_match[] = {
	{"INT339A", 0},
	{}
@@ -377,8 +378,7 @@ static struct i2c_driver fdp_nci_i2c_driver = {
		   .name = FDP_I2C_DRIVER_NAME,
		   .acpi_match_table = ACPI_PTR(fdp_nci_i2c_acpi_match),
		  },
	.id_table = fdp_nci_i2c_id_table,
	.probe = fdp_nci_i2c_probe,
	.probe_new = fdp_nci_i2c_probe,
	.remove = fdp_nci_i2c_remove,
};
module_i2c_driver(fdp_nci_i2c_driver);
Loading