From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH V1 06/15] spmi: pmic-arb: fix missing interrupts Date: Tue, 30 May 2017 19:00:19 -0700 Message-ID: <20170531020019.GX20170@codeaurora.org> References: <1496147943-25822-1-git-send-email-kgunda@codeaurora.org> <1496147943-25822-7-git-send-email-kgunda@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:46466 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbdEaCAV (ORCPT ); Tue, 30 May 2017 22:00:21 -0400 Content-Disposition: inline In-Reply-To: <1496147943-25822-7-git-send-email-kgunda@codeaurora.org> Sender: linux-arm-msm-owner@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org To: Kiran Gunda Cc: Abhijeet Dharmapurikar , Greg Kroah-Hartman , Christophe JAILLET , David Collins , Subbaraman Narayanamurthy , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, adharmap@quicinc.com, aghayal@qti.qualcomm.com On 05/30, Kiran Gunda wrote: > From: Abhijeet Dharmapurikar > > irq_enable is called when the device resumes. Note that the > irq_enable is called regardless of whether the interrupt was > marked enabled/disabled in the descriptor or whether it was > masked/unmasked at the controller while resuming. > > The current driver unconditionally clears the interrupt in its > irq_enable callback. This is dangerous as any interrupts that > happen right before the resume could be missed. > Remove the irq_enable callback and use mask/unmask instead. > > Also remove struct pmic_arb_irq_spec as it serves no real purpose. > It is used only in the translate function and the code is much > cleaner without it. Also a separate patch for that part.... > > Signed-off-by: Abhijeet Dharmapurikar > Signed-off-by: Kiran Gunda > --- > drivers/spmi/spmi-pmic-arb.c | 29 +++-------------------------- > 1 file changed, 3 insertions(+), 26 deletions(-) > > diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c > index 0a5728c..bc03737 100644 > --- a/drivers/spmi/spmi-pmic-arb.c > +++ b/drivers/spmi/spmi-pmic-arb.c > @@ -588,17 +588,6 @@ static void qpnpint_irq_unmask(struct irq_data *d) > qpnpint_spmi_write(d, QPNPINT_REG_EN_CLR, &data, 1); > } > > -static void qpnpint_irq_enable(struct irq_data *d) > -{ > - u8 irq = d->hwirq >> 8; > - u8 data; > - > - qpnpint_irq_unmask(d); > - > - data = BIT(irq); > - qpnpint_spmi_write(d, QPNPINT_REG_LATCHED_CLR, &data, 1); > -} > - > static int qpnpint_irq_set_type(struct irq_data *d, unsigned int flow_type) > { > struct spmi_pmic_arb_qpnpint_type type; > @@ -647,7 +636,6 @@ static int qpnpint_get_irqchip_state(struct irq_data *d, > > static struct irq_chip pmic_arb_irqchip = { > .name = "pmic_arb", > - .irq_enable = qpnpint_irq_enable, > .irq_ack = qpnpint_irq_ack, > .irq_mask = qpnpint_irq_mask, > .irq_unmask = qpnpint_irq_unmask, This looks ok. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project