From be103b714e4e6ad7316b0cb9b9d473ddedaf4ad6 Mon Sep 17 00:00:00 2001 From: Christophe Ricard Date: Wed, 23 Dec 2015 23:45:25 +0100 Subject: nfc: nxp-nci: Remove i2c client gpio irq configuration gpio irq is already configured by the core i2c layers when reaching the probe function. Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- drivers/nfc/nxp-nci/i2c.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'drivers/nfc') diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c index c71adc3254df..11520f472f98 100644 --- a/drivers/nfc/nxp-nci/i2c.c +++ b/drivers/nfc/nxp-nci/i2c.c @@ -52,7 +52,6 @@ struct nxp_nci_i2c_phy { unsigned int gpio_en; unsigned int gpio_fw; - unsigned int gpio_irq; int hard_fault; /* * < 0 if hardware error occurred (e.g. i2c err) @@ -292,39 +291,24 @@ static int nxp_nci_i2c_parse_devtree(struct i2c_client *client) } phy->gpio_fw = r; - r = irq_of_parse_and_map(pp, 0); - if (r < 0) { - nfc_err(&client->dev, "Unable to get irq, error: %d\n", r); - return r; - } - client->irq = r; - return 0; } static int nxp_nci_i2c_acpi_config(struct nxp_nci_i2c_phy *phy) { struct i2c_client *client = phy->i2c_dev; - struct gpio_desc *gpiod_en, *gpiod_fw, *gpiod_irq; + struct gpio_desc *gpiod_en, *gpiod_fw; gpiod_en = devm_gpiod_get_index(&client->dev, NULL, 2, GPIOD_OUT_LOW); gpiod_fw = devm_gpiod_get_index(&client->dev, NULL, 1, GPIOD_OUT_LOW); - gpiod_irq = devm_gpiod_get_index(&client->dev, NULL, 0, GPIOD_IN); - if (IS_ERR(gpiod_en) || IS_ERR(gpiod_fw) || IS_ERR(gpiod_irq)) { + if (IS_ERR(gpiod_en) || IS_ERR(gpiod_fw)) { nfc_err(&client->dev, "No GPIOs\n"); return -EINVAL; } - client->irq = gpiod_to_irq(gpiod_irq); - if (client->irq < 0) { - nfc_err(&client->dev, "No IRQ\n"); - return -EINVAL; - } - phy->gpio_en = desc_to_gpio(gpiod_en); phy->gpio_fw = desc_to_gpio(gpiod_fw); - phy->gpio_irq = desc_to_gpio(gpiod_irq); return 0; } @@ -363,7 +347,6 @@ static int nxp_nci_i2c_probe(struct i2c_client *client, } else if (pdata) { phy->gpio_en = pdata->gpio_en; phy->gpio_fw = pdata->gpio_fw; - client->irq = pdata->irq; } else if (ACPI_HANDLE(&client->dev)) { r = nxp_nci_i2c_acpi_config(phy); if (r < 0) -- cgit v1.2.3