From 1b9b399796dd6f2fc95cc999991d8daeefa6a3ed Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Tue, 4 Feb 2020 21:16:00 -0800 Subject: [PATCH] Revert "pinctrl: msm: Configure interrupts as input and gpio mode" This reverts commit fe2731211e784bff5a738631e5fd48041524239f. By default the commit muxes the pin to a GPIO upon a request_irq() call from the client driver. This is incorrect as the client driver could have muxed the pin already for a different purpose. Hence, revert this default behavior to not enforce this on the clients. Change-Id: Ib2500f57cf7e49a7bffd3309801e42166b748db9 Signed-off-by: Raghavendra Rao Ananta --- drivers/pinctrl/qcom/pinctrl-msm.c | 39 +----------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index a43706711b9c..373fc29eb9c3 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2013, Sony Mobile Communications AB. - * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. */ #include @@ -998,41 +998,6 @@ static int msm_gpio_irq_set_wake(struct irq_data *d, unsigned int on) return 0; } -static int msm_gpio_irq_reqres(struct irq_data *d) -{ - struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - struct msm_pinctrl *pctrl = gpiochip_get_data(gc); - int ret; - - if (!try_module_get(gc->owner)) - return -ENODEV; - - ret = msm_pinmux_request_gpio(pctrl->pctrl, NULL, d->hwirq); - if (ret) - goto out; - msm_gpio_direction_input(gc, d->hwirq); - - if (gpiochip_lock_as_irq(gc, d->hwirq)) { - dev_err(gc->parent, - "unable to lock HW IRQ %lu for IRQ\n", - d->hwirq); - ret = -EINVAL; - goto out; - } - return 0; -out: - module_put(gc->owner); - return ret; -} - -static void msm_gpio_irq_relres(struct irq_data *d) -{ - struct gpio_chip *gc = irq_data_get_irq_chip_data(d); - - gpiochip_unlock_as_irq(gc, d->hwirq); - module_put(gc->owner); -} - static void msm_gpio_irq_handler(struct irq_desc *desc) { struct gpio_chip *gc = irq_desc_get_handler_data(desc); @@ -1129,8 +1094,6 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) pctrl->irq_chip.irq_eoi = irq_chip_eoi_parent; pctrl->irq_chip.irq_set_type = msm_gpio_irq_set_type; pctrl->irq_chip.irq_set_wake = msm_gpio_irq_set_wake; - pctrl->irq_chip.irq_request_resources = msm_gpio_irq_reqres; - pctrl->irq_chip.irq_release_resources = msm_gpio_irq_relres; dn = of_parse_phandle(pctrl->dev->of_node, "wakeup-parent", 0); if (dn) {