From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Sender: rtc-linux@googlegroups.com Received: from relay1.mentorg.com (relay1.mentorg.com. [192.94.38.131]) by gmr-mx.google.com with ESMTPS id n18si3821565pfb.2.2016.11.12.02.07.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Nov 2016 02:07:57 -0800 (PST) From: Nicolae Rosia To: Alessandro Zummo , Alexandre Belloni CC: , , Tony Lindgren , Nicolae Rosia Subject: [rtc-linux] [PATCH 3/3] rtc: rtc-twl: use irq_of_parse_and_map helper Date: Sat, 12 Nov 2016 12:07:26 +0200 Message-ID: <1478945246-32056-4-git-send-email-Nicolae_Rosia@mentor.com> In-Reply-To: <1478945246-32056-1-git-send-email-Nicolae_Rosia@mentor.com> References: <1478945246-32056-1-git-send-email-Nicolae_Rosia@mentor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Reply-To: rtc-linux@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Nicolae Rosia --- drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-twl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 2189216..7ac7579 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -481,7 +481,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_TWL4030 tristate "TI TWL4030/TWL5030/TWL6030/TPS659x0" depends on TWL4030_CORE - depends on OF + depends on OF && OF_IRQ help If you say yes here you get support for the RTC on the TWL4030/TWL5030/TWL6030 family chips, used mostly with OMAP3 platforms. diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 3d76322..7994baf 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -494,7 +495,7 @@ static int twl_rtc_probe(struct platform_device *pdev) struct twl_rtc *twl_rtc; struct device_node *np = pdev->dev.of_node; int ret = -EINVAL; - int irq = platform_get_irq(pdev, 0); + int irq; u8 rd_reg; if (!np) { @@ -502,6 +503,7 @@ static int twl_rtc_probe(struct platform_device *pdev) return -EINVAL; } + irq = irq_of_parse_and_map(np, 0); if (irq <= 0) return ret; -- 2.5.5 -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolae Rosia Subject: [PATCH 3/3] rtc: rtc-twl: use irq_of_parse_and_map helper Date: Sat, 12 Nov 2016 12:07:26 +0200 Message-ID: <1478945246-32056-4-git-send-email-Nicolae_Rosia@mentor.com> References: <1478945246-32056-1-git-send-email-Nicolae_Rosia@mentor.com> Reply-To: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Sender: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org In-Reply-To: <1478945246-32056-1-git-send-email-Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Alessandro Zummo , Alexandre Belloni Cc: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tony Lindgren , Nicolae Rosia List-Id: linux-omap@vger.kernel.org Signed-off-by: Nicolae Rosia --- drivers/rtc/Kconfig | 2 +- drivers/rtc/rtc-twl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 2189216..7ac7579 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -481,7 +481,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_TWL4030 tristate "TI TWL4030/TWL5030/TWL6030/TPS659x0" depends on TWL4030_CORE - depends on OF + depends on OF && OF_IRQ help If you say yes here you get support for the RTC on the TWL4030/TWL5030/TWL6030 family chips, used mostly with OMAP3 platforms. diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c index 3d76322..7994baf 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -30,6 +30,7 @@ #include #include #include +#include #include @@ -494,7 +495,7 @@ static int twl_rtc_probe(struct platform_device *pdev) struct twl_rtc *twl_rtc; struct device_node *np = pdev->dev.of_node; int ret = -EINVAL; - int irq = platform_get_irq(pdev, 0); + int irq; u8 rd_reg; if (!np) { @@ -502,6 +503,7 @@ static int twl_rtc_probe(struct platform_device *pdev) return -EINVAL; } + irq = irq_of_parse_and_map(np, 0); if (irq <= 0) return ret; -- 2.5.5 -- You received this message because you are subscribed to "rtc-linux". Membership options at http://groups.google.com/group/rtc-linux . Please read http://groups.google.com/group/rtc-linux/web/checklist before submitting a driver. --- You received this message because you are subscribed to the Google Groups "rtc-linux" group. To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/d/optout.