From patchwork Thu Aug 16 20:06:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 958588 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="h+Vhk2tE"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41ry6Q2fskz9s4Z for ; Fri, 17 Aug 2018 06:07:10 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725927AbeHPXHh (ORCPT ); Thu, 16 Aug 2018 19:07:37 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38989 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725823AbeHPXHT (ORCPT ); Thu, 16 Aug 2018 19:07:19 -0400 Received: by mail-pf1-f196.google.com with SMTP id j8-v6so2489452pff.6 for ; Thu, 16 Aug 2018 13:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YbEgU6NoCTKY3cxZJBhRAPLasbYsKrPISCc9HR3/AbY=; b=h+Vhk2tEsYo3goR0+igWXENVwiGtm4Gs/UC2MQQBjDLZyCUWBgPNgkASxwrbXFN2iX JrRSYFqywZn9pXx1eMMDn87XJPC1tYb9NsxSep0bBOXuyICT20/lwzPcVh3op3UtzBUd giXD35ZtPGlyxvF+fqzwlWus+V2kJ1chErYkE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YbEgU6NoCTKY3cxZJBhRAPLasbYsKrPISCc9HR3/AbY=; b=JkcU2d4bNFVQhZj/ow+tOwNiEtBv7NvePiTd3RL1mapiHJnZX7bNw7pcJm5zHsQ5OI 0jH5wjw4n2V09Rn9iSfHq2g+yKnDMOKWCvF8N2HCL397L2HC5oJMcSzSU37dztpKH4Dc eVDK03ODsO2NDV9ADodFZaPVDcTe7yXSIQB8EYsvywjaqY3IS5NLbVgQIiUjX244GbRw SrynTY5Gmvm+Flg/jP9WUSc1xvMjBmh1ed/YlsJq7OwnCT1IalrbpOhBnFD5gDBaDto5 CfEgby+wy2UNKCjuqKEUaLyE0lnVaHNY6xW9WR1E9nTSQz40lSZ3BMMEydLhSPg3yDvq Pwig== X-Gm-Message-State: AOUpUlGvBzh8F8CVic8oudtmzPMKKojpi5OiRcahgHOEdKxKCyT0zwu9 ufihlv01FMGqoB8708OE46rGCMeUjMR3Yw== X-Google-Smtp-Source: AA+uWPzVWDuyHXUKSv4m9HcK1zLjWV8ebyRpm5dzOU0VflYCFinfSKC/G2mukHkTY9ezO9EmqEGpNQ== X-Received: by 2002:a65:6455:: with SMTP id s21-v6mr184200pgv.25.1534450010878; Thu, 16 Aug 2018 13:06:50 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id v6-v6sm234958pfa.28.2018.08.16.13.06.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 13:06:50 -0700 (PDT) From: Stephen Boyd To: Linus Walleij Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bjorn Andersson , Doug Anderson Subject: [PATCH v3 1/3] pinctrl: msm: Really mask level interrupts to prevent latching Date: Thu, 16 Aug 2018 13:06:46 -0700 Message-Id: <20180816200648.90458-2-swboyd@chromium.org> X-Mailer: git-send-email 2.18.0.865.gffc8e1a3cd6-goog In-Reply-To: <20180816200648.90458-1-swboyd@chromium.org> References: <20180816200648.90458-1-swboyd@chromium.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org The interrupt controller hardware in this pin controller has two status enable bits. The first "normal" status enable bit enables or disables the summary interrupt line being raised when a gpio interrupt triggers and the "raw" status enable bit allows or prevents the hardware from latching an interrupt into the status register for a gpio interrupt. Currently we just toggle the "normal" status enable bit in the mask and unmask ops so that the summary irq interrupt going to the CPU's interrupt controller doesn't trigger for the masked gpio interrupt. For a level triggered interrupt, the flow would be as follows: the pin controller sees the interrupt, latches the status into the status register, raises the summary irq to the CPU, summary irq handler runs and calls handle_level_irq(), handle_level_irq() masks and acks the gpio interrupt, the interrupt handler runs, and finally unmask the interrupt. When the interrupt handler completes, we expect that the interrupt line level will go back to the deasserted state so the genirq code can unmask the interrupt without it triggering again. If we only mask the interrupt by clearing the "normal" status enable bit then we'll ack the interrupt but it will continue to show up as pending in the status register because the raw status bit is enabled, the hardware hasn't deasserted the line, and thus the asserted state latches into the status register again. When the hardware deasserts the interrupt the pin controller still thinks there is a pending unserviced level interrupt because it latched it earlier. This behavior causes software to see an extra interrupt for level type interrupts each time the interrupt is handled. Let's fix this by clearing the raw status enable bit for level type interrupts so that the hardware stops latching the status of the interrupt after we ack it. We don't do this for edge type interrupts because it seems that toggling the raw status enable bit for edge type interrupts causes spurious edge interrupts. Cc: Bjorn Andersson Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Douglas Anderson Reviewed-by: Bjorn Andersson --- drivers/pinctrl/qcom/pinctrl-msm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 2155a30c282b..5d72ffad32c2 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -634,6 +634,29 @@ static void msm_gpio_irq_mask(struct irq_data *d) raw_spin_lock_irqsave(&pctrl->lock, flags); val = readl(pctrl->regs + g->intr_cfg_reg); + /* + * There are two bits that control interrupt forwarding to the CPU. The + * RAW_STATUS_EN bit causes the level or edge sensed on the line to be + * latched into the interrupt status register when the hardware detects + * an irq that it's configured for (either edge for edge type or level + * for level type irq). The 'non-raw' status enable bit causes the + * hardware to assert the summary interrupt to the CPU if the latched + * status bit is set. There's a bug though, the edge detection logic + * seems to have a problem where toggling the RAW_STATUS_EN bit may + * cause the status bit to latch spuriously when there isn't any edge + * so we can't touch that bit for edge type irqs and we have to keep + * the bit set anyway so that edges are latched while the line is masked. + * + * To make matters more complicated, leaving the RAW_STATUS_EN bit + * enabled all the time causes level interrupts to re-latch into the + * status register because the level is still present on the line after + * we ack it. We clear the raw status enable bit during mask here and + * set the bit on unmask so the interrupt can't latch into the hardware + * while it's masked. + */ + if (irqd_get_trigger_type(d) & IRQ_TYPE_LEVEL_MASK) + val &= ~BIT(g->intr_raw_status_bit); + val &= ~BIT(g->intr_enable_bit); writel(val, pctrl->regs + g->intr_cfg_reg); @@ -655,6 +678,7 @@ static void msm_gpio_irq_unmask(struct irq_data *d) raw_spin_lock_irqsave(&pctrl->lock, flags); val = readl(pctrl->regs + g->intr_cfg_reg); + val |= BIT(g->intr_raw_status_bit); val |= BIT(g->intr_enable_bit); writel(val, pctrl->regs + g->intr_cfg_reg); From patchwork Thu Aug 16 20:06:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 958587 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="AURecagf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41ry6F2KKdz9s8T for ; Fri, 17 Aug 2018 06:07:01 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726168AbeHPXHU (ORCPT ); Thu, 16 Aug 2018 19:07:20 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:32929 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbeHPXHU (ORCPT ); Thu, 16 Aug 2018 19:07:20 -0400 Received: by mail-pg1-f194.google.com with SMTP id r64-v6so1369810pgr.0 for ; Thu, 16 Aug 2018 13:06:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NV6/vcFg/jcSYYSg0yJsaWgzVmwAkbB2HjRIb3vdI3c=; b=AURecagfFN5dIe26lIB4aWciGBgGjtG+PrIPDzj2Rry2W2KxHU+a9s20CfaHL8Re6e snCNwrCslFca/s9lFBokVwCJLrRXkX1qrLMxVSjFdMHCLdMwg76rE2lbtlS/xsCrofyd TfOOkcuqEN70Qu53HmcZ7e8FguCwusE/xbing= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NV6/vcFg/jcSYYSg0yJsaWgzVmwAkbB2HjRIb3vdI3c=; b=RmOi0ijevecwB7af+qBKThCdPrTRuvHGgSJlj1EsHR3dQtfqDFyXXAzySORbZv4LgV mYUIRjYpOX2wnUfwXcOxKAPRXZcSvhQgIOuigzfnbtCm4No8vlG2zYlfjgCgjwADeWSa 2OTnfaTkwX/ScIbVZnj6osClgLfux+meRuELc+OtaRLSbimz1XVUXIHBRZq8h6Mk0a2u qabm5H97tGU3oXfZmNzhOUcekWWTr4Mo9j4ezdMzPcvWMSuSW6nb4YspVJcaGE1btMCB YnAGW926j9JBDO3QBkdr93C7de/9lvna2ANjHiJvXo8Aamfa5Pwj5+Kmf7FjSFCrh8QH jqBQ== X-Gm-Message-State: AOUpUlGrcfT/09xZK0x24vGEhw5SQPyUVrafXbC4cXxIbf3qQrpu/dFv tRHv2TWg9uaA/xB1OcFfvH5K1w== X-Google-Smtp-Source: AA+uWPzZn9ysXQv9DDV/iXtVKTORHTLddnfsGUQzJyJTSHyDPO66oTNlHv1rOFrvObdi9rdpcql8pA== X-Received: by 2002:a65:658d:: with SMTP id u13-v6mr30556076pgv.20.1534450011651; Thu, 16 Aug 2018 13:06:51 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id v6-v6sm234958pfa.28.2018.08.16.13.06.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 13:06:51 -0700 (PDT) From: Stephen Boyd To: Linus Walleij Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bjorn Andersson , Doug Anderson Subject: [PATCH v3 2/3] pinctrl: msm: Mux out gpio function with gpio_request() Date: Thu, 16 Aug 2018 13:06:47 -0700 Message-Id: <20180816200648.90458-3-swboyd@chromium.org> X-Mailer: git-send-email 2.18.0.865.gffc8e1a3cd6-goog In-Reply-To: <20180816200648.90458-1-swboyd@chromium.org> References: <20180816200648.90458-1-swboyd@chromium.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org We rely on devices to use pinmuxing configurations in DT to select the GPIO function (function 0) if they're going to use the gpio in GPIO mode. Let's simplify things for driver authors by implementing gpio_request_enable() for this pinctrl driver to mux out the GPIO function when the gpio is use from gpiolib. Cc: Bjorn Andersson Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson --- drivers/pinctrl/qcom/pinctrl-msm.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 5d72ffad32c2..793504057ad0 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -176,11 +176,27 @@ static int msm_pinmux_set_mux(struct pinctrl_dev *pctldev, return 0; } +static int msm_pinmux_request_gpio(struct pinctrl_dev *pctldev, + struct pinctrl_gpio_range *range, + unsigned offset) +{ + struct msm_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev); + const struct msm_pingroup *g = &pctrl->soc->groups[offset]; + + /* No funcs? Probably ACPI so can't do anything here */ + if (!g->nfuncs) + return 0; + + /* For now assume function 0 is GPIO because it always is */ + return msm_pinmux_set_mux(pctldev, 0, offset); +} + static const struct pinmux_ops msm_pinmux_ops = { .request = msm_pinmux_request, .get_functions_count = msm_get_functions_count, .get_function_name = msm_get_function_name, .get_function_groups = msm_get_function_groups, + .gpio_request_enable = msm_pinmux_request_gpio, .set_mux = msm_pinmux_set_mux, }; From patchwork Thu Aug 16 20:06:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 958586 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=reject dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="I9NIiuBd"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 41ry6D2bsZz9s4Z for ; Fri, 17 Aug 2018 06:07:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725899AbeHPXH0 (ORCPT ); Thu, 16 Aug 2018 19:07:26 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:43506 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726160AbeHPXHU (ORCPT ); Thu, 16 Aug 2018 19:07:20 -0400 Received: by mail-pg1-f196.google.com with SMTP id v66-v6so1208808pgb.10 for ; Thu, 16 Aug 2018 13:06:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iMKRdNeILqQLW5HhEx3LzFsQ/qoXER6KwX/yBEgkUV4=; b=I9NIiuBdiyT0I+OVxMX0AfxDxGCyzDOqLTMUfKmocO74LqkxshVEHhB0au3mLdwZCR sIr89wpFOPPYre36P2oDeoI+Uytin9uGCAZCN+k7T/CsCRxz2JGsp0stTmZH1BJ1qYD2 FkflIQ2zWJ0EP4Tl9ibBcYen1QkKoSUTJ7IUA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iMKRdNeILqQLW5HhEx3LzFsQ/qoXER6KwX/yBEgkUV4=; b=JpkYEwMrcMmESyoCPIUj+KDsp+K5nX842wRpxVVUlV1h9G4vXdOGlReMCrl5d9/MmV t4+DEUJRnmDhQseArEtPb+VvOcFTR/uy5TOZDCop25Ww8iEqqEjcmDx8FutPyWFdT2DL 2HwyGTJmtzAwZmYmjx6+NyUtUGUqql46KiMqq370lEHK5cUbBz6ombzJL5K8DC0bcamZ /21BbJMEcnj8CpxhGf13iH+9UcSXP2M5IGTt0rqTpdt3hpsmGcU0q1EU8h5fImN2VOm4 MNzXodSNhsaff/It+Gi2Nke090AhSCMcm9THziH6U+gNwC835i0gTicND/Tp6VPaFA5B L7pw== X-Gm-Message-State: AOUpUlFvYvhzlbyHj4XA95HDvGlvbtu6JJ2WaPlTVNaU6r6JE6FGTW3X 4xQW5FIL9Z/QFQHQ36mKsxx1gQ== X-Google-Smtp-Source: AA+uWPxNu4xiDO7E4q/qeSaIVrDmeyn1KulQm4yAErtJqJsDZFJ1kwl9jI7Vb2ACi6ufp7T0iRLeoA== X-Received: by 2002:a63:e914:: with SMTP id i20-v6mr30144803pgh.10.1534450012425; Thu, 16 Aug 2018 13:06:52 -0700 (PDT) Received: from smtp.gmail.com ([2620:15c:202:201:7e28:b9f3:6afc:5326]) by smtp.gmail.com with ESMTPSA id v6-v6sm234958pfa.28.2018.08.16.13.06.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Aug 2018 13:06:52 -0700 (PDT) From: Stephen Boyd To: Linus Walleij Cc: linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-msm@vger.kernel.org, Bjorn Andersson , Doug Anderson Subject: [PATCH v3 3/3] pinctrl: msm: Configure interrupts as input and gpio mode Date: Thu, 16 Aug 2018 13:06:48 -0700 Message-Id: <20180816200648.90458-4-swboyd@chromium.org> X-Mailer: git-send-email 2.18.0.865.gffc8e1a3cd6-goog In-Reply-To: <20180816200648.90458-1-swboyd@chromium.org> References: <20180816200648.90458-1-swboyd@chromium.org> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org When requesting a gpio as an interrupt, we should make sure to mux the pin as the GPIO function and configure it to be an input so that various functions or output signals don't affect the interrupt state of the pin. So far, we've relied on pinmux configurations in DT to handle this, but let's explicitly configure this in the code so that DT implementers don't have to get this part right. Cc: Bjorn Andersson Cc: Doug Anderson Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson --- drivers/pinctrl/qcom/pinctrl-msm.c | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c index 793504057ad0..defed34d32b0 100644 --- a/drivers/pinctrl/qcom/pinctrl-msm.c +++ b/drivers/pinctrl/qcom/pinctrl-msm.c @@ -837,6 +837,41 @@ 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); @@ -935,6 +970,8 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl) pctrl->irq_chip.irq_ack = msm_gpio_irq_ack; 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; ret = gpiochip_add_data(&pctrl->chip, pctrl); if (ret) {