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

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

authored by

Christophe Ricard and committed by
Samuel Ortiz
be103b71 7be4fb64

+2 -19
+2 -19
drivers/nfc/nxp-nci/i2c.c
··· 52 52 53 53 unsigned int gpio_en; 54 54 unsigned int gpio_fw; 55 - unsigned int gpio_irq; 56 55 57 56 int hard_fault; /* 58 57 * < 0 if hardware error occurred (e.g. i2c err) ··· 291 292 } 292 293 phy->gpio_fw = r; 293 294 294 - r = irq_of_parse_and_map(pp, 0); 295 - if (r < 0) { 296 - nfc_err(&client->dev, "Unable to get irq, error: %d\n", r); 297 - return r; 298 - } 299 - client->irq = r; 300 - 301 295 return 0; 302 296 } 303 297 304 298 static int nxp_nci_i2c_acpi_config(struct nxp_nci_i2c_phy *phy) 305 299 { 306 300 struct i2c_client *client = phy->i2c_dev; 307 - struct gpio_desc *gpiod_en, *gpiod_fw, *gpiod_irq; 301 + struct gpio_desc *gpiod_en, *gpiod_fw; 308 302 309 303 gpiod_en = devm_gpiod_get_index(&client->dev, NULL, 2, GPIOD_OUT_LOW); 310 304 gpiod_fw = devm_gpiod_get_index(&client->dev, NULL, 1, GPIOD_OUT_LOW); 311 - gpiod_irq = devm_gpiod_get_index(&client->dev, NULL, 0, GPIOD_IN); 312 305 313 - if (IS_ERR(gpiod_en) || IS_ERR(gpiod_fw) || IS_ERR(gpiod_irq)) { 306 + if (IS_ERR(gpiod_en) || IS_ERR(gpiod_fw)) { 314 307 nfc_err(&client->dev, "No GPIOs\n"); 315 - return -EINVAL; 316 - } 317 - 318 - client->irq = gpiod_to_irq(gpiod_irq); 319 - if (client->irq < 0) { 320 - nfc_err(&client->dev, "No IRQ\n"); 321 308 return -EINVAL; 322 309 } 323 310 324 311 phy->gpio_en = desc_to_gpio(gpiod_en); 325 312 phy->gpio_fw = desc_to_gpio(gpiod_fw); 326 - phy->gpio_irq = desc_to_gpio(gpiod_irq); 327 313 328 314 return 0; 329 315 } ··· 347 363 } else if (pdata) { 348 364 phy->gpio_en = pdata->gpio_en; 349 365 phy->gpio_fw = pdata->gpio_fw; 350 - client->irq = pdata->irq; 351 366 } else if (ACPI_HANDLE(&client->dev)) { 352 367 r = nxp_nci_i2c_acpi_config(phy); 353 368 if (r < 0)