diff options
Diffstat (limited to 'drivers/nfc/pn544')
-rw-r--r-- | drivers/nfc/pn544/i2c.c | 43 | ||||
-rw-r--r-- | drivers/nfc/pn544/mei.c | 2 |
2 files changed, 12 insertions, 33 deletions
diff --git a/drivers/nfc/pn544/i2c.c b/drivers/nfc/pn544/i2c.c index 6acc85a0e..3629a7056 100644 --- a/drivers/nfc/pn544/i2c.c +++ b/drivers/nfc/pn544/i2c.c @@ -895,56 +895,35 @@ static int pn544_hci_i2c_acpi_request_resources(struct i2c_client *client) return -ENODEV; /* Get EN GPIO from ACPI */ - gpiod_en = devm_gpiod_get_index(dev, PN544_GPIO_NAME_EN, 1); + gpiod_en = devm_gpiod_get_index(dev, PN544_GPIO_NAME_EN, 1, + GPIOD_OUT_LOW); if (IS_ERR(gpiod_en)) { - nfc_err(dev, - "Unable to get EN GPIO\n"); + nfc_err(dev, "Unable to get EN GPIO\n"); return -ENODEV; } - phy->gpio_en = desc_to_gpio(gpiod_en); - - /* Configuration EN GPIO */ - ret = gpiod_direction_output(gpiod_en, 0); - if (ret) { - nfc_err(dev, "Fail EN pin direction\n"); - return ret; - } + phy->gpio_en = desc_to_gpio(gpiod_en); /* Get FW GPIO from ACPI */ - gpiod_fw = devm_gpiod_get_index(dev, PN544_GPIO_NAME_FW, 2); + gpiod_fw = devm_gpiod_get_index(dev, PN544_GPIO_NAME_FW, 2, + GPIOD_OUT_LOW); if (IS_ERR(gpiod_fw)) { - nfc_err(dev, - "Unable to get FW GPIO\n"); + nfc_err(dev, "Unable to get FW GPIO\n"); return -ENODEV; } - phy->gpio_fw = desc_to_gpio(gpiod_fw); - - /* Configuration FW GPIO */ - ret = gpiod_direction_output(gpiod_fw, 0); - if (ret) { - nfc_err(dev, "Fail FW pin direction\n"); - return ret; - } + phy->gpio_fw = desc_to_gpio(gpiod_fw); /* Get IRQ GPIO */ - gpiod_irq = devm_gpiod_get_index(dev, PN544_GPIO_NAME_IRQ, 0); + gpiod_irq = devm_gpiod_get_index(dev, PN544_GPIO_NAME_IRQ, 0, + GPIOD_IN); if (IS_ERR(gpiod_irq)) { - nfc_err(dev, - "Unable to get IRQ GPIO\n"); + nfc_err(dev, "Unable to get IRQ GPIO\n"); return -ENODEV; } phy->gpio_irq = desc_to_gpio(gpiod_irq); - /* Configure IRQ GPIO */ - ret = gpiod_direction_input(gpiod_irq); - if (ret) { - nfc_err(dev, "Fail IRQ pin direction\n"); - return ret; - } - /* Map the pin to an IRQ */ ret = gpiod_to_irq(gpiod_irq); if (ret < 0) { diff --git a/drivers/nfc/pn544/mei.c b/drivers/nfc/pn544/mei.c index 330cd4031..101a37e12 100644 --- a/drivers/nfc/pn544/mei.c +++ b/drivers/nfc/pn544/mei.c @@ -67,7 +67,7 @@ static int pn544_mei_remove(struct mei_cl_device *device) } static struct mei_cl_device_id pn544_mei_tbl[] = { - { PN544_DRIVER_NAME }, + { PN544_DRIVER_NAME, MEI_NFC_UUID}, /* required last entry */ { } |