From: Nicolae Rosia <Nicolae_Rosia@mentor.com> To: Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@free-electrons.com> Cc: <rtc-linux@googlegroups.com>, <linux-omap@vger.kernel.org>, Tony Lindgren <tony@atomide.com>, Nicolae Rosia <Nicolae_Rosia@mentor.com> Subject: [rtc-linux] [PATCH 2/3] rtc: rtc-twl: make driver DT only Date: Sat, 12 Nov 2016 12:07:25 +0200 [thread overview] Message-ID: <1478945246-32056-3-git-send-email-Nicolae_Rosia@mentor.com> (raw) In-Reply-To: <1478945246-32056-1-git-send-email-Nicolae_Rosia@mentor.com> Since there are no platform based users and all users of this code are TI OMAP-based which is DT only, it makes sense to remove unused code. Signed-off-by: Nicolae Rosia <Nicolae_Rosia@mentor.com> --- drivers/rtc/Kconfig | 1 + drivers/rtc/rtc-twl.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index e859d14..2189216 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -481,6 +481,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_TWL4030 tristate "TI TWL4030/TWL5030/TWL6030/TPS659x0" depends on TWL4030_CORE + depends on OF 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 0a1700a0..3d76322 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -492,10 +492,16 @@ static const struct rtc_class_ops twl_rtc_ops = { 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); u8 rd_reg; + if (!np) { + dev_err(&pdev->dev, "no DT info\n"); + return -EINVAL; + } + if (irq <= 0) return ret; @@ -625,15 +631,11 @@ static int twl_rtc_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(twl_rtc_pm_ops, twl_rtc_suspend, twl_rtc_resume); -#ifdef CONFIG_OF static const struct of_device_id twl_rtc_of_match[] = { {.compatible = "ti,twl4030-rtc", }, { }, }; MODULE_DEVICE_TABLE(of, twl_rtc_of_match); -#endif - -MODULE_ALIAS("platform:twl_rtc"); static struct platform_driver twl4030rtc_driver = { .probe = twl_rtc_probe, -- 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.
WARNING: multiple messages have this Message-ID (diff)
From: Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> To: Alessandro Zummo <a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>, Alexandre Belloni <alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Cc: rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>, Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> Subject: [PATCH 2/3] rtc: rtc-twl: make driver DT only Date: Sat, 12 Nov 2016 12:07:25 +0200 [thread overview] Message-ID: <1478945246-32056-3-git-send-email-Nicolae_Rosia@mentor.com> (raw) In-Reply-To: <1478945246-32056-1-git-send-email-Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> Since there are no platform based users and all users of this code are TI OMAP-based which is DT only, it makes sense to remove unused code. Signed-off-by: Nicolae Rosia <Nicolae_Rosia-nmGgyN9QBj3QT0dZR+AlfA@public.gmane.org> --- drivers/rtc/Kconfig | 1 + drivers/rtc/rtc-twl.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index e859d14..2189216 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -481,6 +481,7 @@ config RTC_DRV_TWL92330 config RTC_DRV_TWL4030 tristate "TI TWL4030/TWL5030/TWL6030/TPS659x0" depends on TWL4030_CORE + depends on OF 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 0a1700a0..3d76322 100644 --- a/drivers/rtc/rtc-twl.c +++ b/drivers/rtc/rtc-twl.c @@ -492,10 +492,16 @@ static const struct rtc_class_ops twl_rtc_ops = { 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); u8 rd_reg; + if (!np) { + dev_err(&pdev->dev, "no DT info\n"); + return -EINVAL; + } + if (irq <= 0) return ret; @@ -625,15 +631,11 @@ static int twl_rtc_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(twl_rtc_pm_ops, twl_rtc_suspend, twl_rtc_resume); -#ifdef CONFIG_OF static const struct of_device_id twl_rtc_of_match[] = { {.compatible = "ti,twl4030-rtc", }, { }, }; MODULE_DEVICE_TABLE(of, twl_rtc_of_match); -#endif - -MODULE_ALIAS("platform:twl_rtc"); static struct platform_driver twl4030rtc_driver = { .probe = twl_rtc_probe, -- 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.
next prev parent reply other threads:[~2016-11-12 10:07 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-11-12 10:07 [rtc-linux] [PATCH 0/3] rtc: rtc-twl: cleanup Nicolae Rosia 2016-11-12 10:07 ` Nicolae Rosia 2016-11-12 10:07 ` [rtc-linux] [PATCH 1/3] rtc: rtc-twl: kill static variables Nicolae Rosia 2016-11-12 10:07 ` Nicolae Rosia 2016-11-22 22:31 ` [rtc-linux] " Alexandre Belloni 2016-11-22 22:31 ` Alexandre Belloni 2016-11-23 8:39 ` [rtc-linux] " Nicolae Rosia 2016-11-23 8:39 ` Nicolae Rosia 2016-11-23 8:46 ` [rtc-linux] " Alexandre Belloni 2016-11-23 8:46 ` Alexandre Belloni 2016-11-23 8:57 ` [rtc-linux] " Nicolae Rosia 2016-11-23 8:57 ` Nicolae Rosia 2016-11-12 10:07 ` Nicolae Rosia [this message] 2016-11-12 10:07 ` [PATCH 2/3] rtc: rtc-twl: make driver DT only Nicolae Rosia 2016-11-22 22:33 ` [rtc-linux] " Alexandre Belloni 2016-11-22 22:33 ` Alexandre Belloni 2016-11-23 8:40 ` [rtc-linux] " Nicolae Rosia 2016-11-23 8:40 ` Nicolae Rosia 2016-11-12 10:07 ` [rtc-linux] [PATCH 3/3] rtc: rtc-twl: use irq_of_parse_and_map helper Nicolae Rosia 2016-11-12 10:07 ` Nicolae Rosia 2016-11-12 11:20 ` [rtc-linux] " Sebastian Reichel 2016-11-12 11:20 ` Sebastian Reichel 2016-11-12 11:37 ` [rtc-linux] " Nicolae Rosia 2016-11-12 11:37 ` Nicolae Rosia 2016-11-12 17:58 ` [rtc-linux] " Tony Lindgren 2016-11-12 17:58 ` Tony Lindgren 2016-11-12 10:23 ` [rtc-linux] Re: [PATCH 0/3] rtc: rtc-twl: cleanup Nicolae Rosia 2016-11-12 10:23 ` Nicolae Rosia 2016-11-15 0:42 ` [rtc-linux] " Tony Lindgren 2016-11-15 0:42 ` Tony Lindgren
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1478945246-32056-3-git-send-email-Nicolae_Rosia@mentor.com \ --to=nicolae_rosia@mentor.com \ --cc=a.zummo@towertech.it \ --cc=alexandre.belloni@free-electrons.com \ --cc=linux-omap@vger.kernel.org \ --cc=rtc-linux@googlegroups.com \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.