Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

nfc: pn544: 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 <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Christophe Ricard and committed by
Samuel Ortiz
97b69788 be103b71

+1 -34
+1 -34
drivers/nfc/pn544/i2c.c
··· 166 166 struct nfc_hci_dev *hdev; 167 167 168 168 unsigned int gpio_en; 169 - unsigned int gpio_irq; 170 169 unsigned int gpio_fw; 171 170 unsigned int en_polarity; 172 171 ··· 878 879 { 879 880 struct pn544_i2c_phy *phy = i2c_get_clientdata(client); 880 881 const struct acpi_device_id *id; 881 - struct gpio_desc *gpiod_en, *gpiod_irq, *gpiod_fw; 882 + struct gpio_desc *gpiod_en, *gpiod_fw; 882 883 struct device *dev; 883 - int ret; 884 884 885 885 if (!client) 886 886 return -EINVAL; ··· 911 913 } 912 914 913 915 phy->gpio_fw = desc_to_gpio(gpiod_fw); 914 - 915 - /* Get IRQ GPIO */ 916 - gpiod_irq = devm_gpiod_get_index(dev, PN544_GPIO_NAME_IRQ, 0, 917 - GPIOD_IN); 918 - if (IS_ERR(gpiod_irq)) { 919 - nfc_err(dev, "Unable to get IRQ GPIO\n"); 920 - return -ENODEV; 921 - } 922 - 923 - phy->gpio_irq = desc_to_gpio(gpiod_irq); 924 - 925 - /* Map the pin to an IRQ */ 926 - ret = gpiod_to_irq(gpiod_irq); 927 - if (ret < 0) { 928 - nfc_err(dev, "Fail pin IRQ mapping\n"); 929 - return ret; 930 - } 931 - 932 - nfc_info(dev, "GPIO resource, no:%d irq:%d\n", 933 - desc_to_gpio(gpiod_irq), ret); 934 - client->irq = ret; 935 916 936 917 return 0; 937 918 } ··· 970 993 nfc_err(&client->dev, "Fail FW pin direction\n"); 971 994 goto err_gpio_fw; 972 995 } 973 - 974 - /* IRQ */ 975 - ret = irq_of_parse_and_map(pp, 0); 976 - if (ret < 0) { 977 - nfc_err(&client->dev, 978 - "Unable to get irq, error: %d\n", ret); 979 - goto err_gpio_fw; 980 - } 981 - client->irq = ret; 982 996 983 997 return 0; 984 998 ··· 1033 1065 1034 1066 phy->gpio_en = pdata->get_gpio(NFC_GPIO_ENABLE); 1035 1067 phy->gpio_fw = pdata->get_gpio(NFC_GPIO_FW_RESET); 1036 - phy->gpio_irq = pdata->get_gpio(NFC_GPIO_IRQ); 1037 1068 /* Using ACPI */ 1038 1069 } else if (ACPI_HANDLE(&client->dev)) { 1039 1070 r = pn544_hci_i2c_acpi_request_resources(client);