Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753109AbbDGHhf (ORCPT ); Tue, 7 Apr 2015 03:37:35 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:36110 "EHLO mail-wg0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751390AbbDGHhd (ORCPT ); Tue, 7 Apr 2015 03:37:33 -0400 Date: Tue, 7 Apr 2015 08:37:28 +0100 From: Lee Jones To: Krzysztof Kozlowski Cc: Sangbeom Kim , Samuel Ortiz , linux-kernel@vger.kernel.org, Kukjin Kim , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Javier Martinez Canillas Subject: Re: [PATCH 1/2] mfd: sec: Fix RTC alarm interrupt number on S2MPS11 Message-ID: <20150407073728.GH3461@x1> References: <1427985376-20420-1-git-send-email-k.kozlowski@samsung.com> <1427985376-20420-2-git-send-email-k.kozlowski@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1427985376-20420-2-git-send-email-k.kozlowski@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2480 Lines: 79 On Thu, 02 Apr 2015, Krzysztof Kozlowski wrote: > The RTC on S2MPS11 is the same as S2MPS14. However interrupt numbers of > RTC alarms 0 and 1 were inversed between these two devices. So when > rtc-s5m driver requested S2MPS14_IRQ_RTCA0 interrupt, it matched to > S2MPS11_IRQ_RTCA1, not RTCA0. > > Fix this by using consistent RTC alarm interrupt numbers and adding a > BUILD_BUG_ON for future generations. > > Signed-off-by: Krzysztof Kozlowski > --- > drivers/mfd/sec-irq.c | 14 ++++++++++---- > include/linux/mfd/samsung/irq.h | 2 +- > 2 files changed, 11 insertions(+), 5 deletions(-) Applied, thanks. > diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c > index ba86a918c2da..806fa8dbb22d 100644 > --- a/drivers/mfd/sec-irq.c > +++ b/drivers/mfd/sec-irq.c > @@ -61,14 +61,14 @@ static const struct regmap_irq s2mps11_irqs[] = { > .reg_offset = 1, > .mask = S2MPS11_IRQ_RTC60S_MASK, > }, > - [S2MPS11_IRQ_RTCA0] = { > - .reg_offset = 1, > - .mask = S2MPS11_IRQ_RTCA0_MASK, > - }, > [S2MPS11_IRQ_RTCA1] = { > .reg_offset = 1, > .mask = S2MPS11_IRQ_RTCA1_MASK, > }, > + [S2MPS11_IRQ_RTCA0] = { > + .reg_offset = 1, > + .mask = S2MPS11_IRQ_RTCA0_MASK, > + }, > [S2MPS11_IRQ_SMPL] = { > .reg_offset = 1, > .mask = S2MPS11_IRQ_SMPL_MASK, > @@ -484,6 +484,12 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic) > return ret; > } > > + /* > + * The rtc-s5m driver requests S2MPS14_IRQ_RTCA0 also for S2MPS11 > + * so the interrupt number must be consistent. > + */ > + BUILD_BUG_ON(((enum s2mps14_irq)S2MPS11_IRQ_RTCA0) != S2MPS14_IRQ_RTCA0); > + > return 0; > } > > diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h > index f35af7361b60..667aa40486dd 100644 > --- a/include/linux/mfd/samsung/irq.h > +++ b/include/linux/mfd/samsung/irq.h > @@ -74,8 +74,8 @@ enum s2mps11_irq { > S2MPS11_IRQ_MRB, > > S2MPS11_IRQ_RTC60S, > - S2MPS11_IRQ_RTCA0, > S2MPS11_IRQ_RTCA1, > + S2MPS11_IRQ_RTCA0, > S2MPS11_IRQ_SMPL, > S2MPS11_IRQ_RTC1S, > S2MPS11_IRQ_WTSR, -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/