From: Dave Gerlach <d-gerlach@ti.com>
To: Tony Lindgren <tony@atomide.com>,
Santosh Shilimkar <ssantosh@kernel.org>,
Russell King <linux@armlinux.org.uk>
Cc: Keerthy J <j-keerthy@ti.com>,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Dave Gerlach <d-gerlach@ti.com>
Subject: [PATCH v2 5/5] ARM: OMAP2+: Create dummy platform_device for pm33xx
Date: Fri, 19 May 2017 15:04:38 -0500 [thread overview]
Message-ID: <20170519200438.9502-6-d-gerlach@ti.com> (raw)
In-Reply-To: <20170519200438.9502-1-d-gerlach@ti.com>
Add amx3_common_pm_init to create a dummy platform_device for
pm33xx so that our pm33xx module can probe and am335x and am437x
platforms to enable basic suspend to mem and standby support.
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
---
arch/arm/mach-omap2/common.h | 7 +++++++
arch/arm/mach-omap2/io.c | 2 ++
arch/arm/mach-omap2/pm33xx-core.c | 12 ++++++++++++
3 files changed, 21 insertions(+)
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 3089d3bfa19b..cd7724d040f8 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -77,6 +77,13 @@ static inline int omap4_pm_init_early(void)
}
#endif
+#if defined(CONFIG_PM) && (defined(CONFIG_SOC_AM33XX) || \
+ defined(CONFIG_SOC_AM43XX))
+void amx3_common_pm_init(void);
+#else
+static inline void amx3_common_pm_init(void) { }
+#endif
+
extern void omap2_init_common_infrastructure(void);
extern void omap_init_time(void);
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 5aafb8449c40..1bbbf19c93ea 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -652,6 +652,7 @@ void __init am33xx_init_early(void)
void __init am33xx_init_late(void)
{
omap_common_late_init();
+ amx3_common_pm_init();
}
#endif
@@ -676,6 +677,7 @@ void __init am43xx_init_late(void)
{
omap_common_late_init();
omap2_clk_enable_autoidle_all();
+ amx3_common_pm_init();
}
#endif
diff --git a/arch/arm/mach-omap2/pm33xx-core.c b/arch/arm/mach-omap2/pm33xx-core.c
index c84ffc4de2e9..b5d90841c27a 100644
--- a/arch/arm/mach-omap2/pm33xx-core.c
+++ b/arch/arm/mach-omap2/pm33xx-core.c
@@ -179,3 +179,15 @@ struct am33xx_pm_platform_data *am33xx_pm_get_pdata(void)
else
return NULL;
}
+
+void __init amx3_common_pm_init(void)
+{
+ struct platform_device_info devinfo = { };
+ struct am33xx_pm_platform_data *pdata;
+
+ pdata = am33xx_pm_get_pdata();
+ devinfo.name = "pm33xx";
+ devinfo.data = pdata;
+ devinfo.size_data = sizeof(*pdata);
+ platform_device_register_full(&devinfo);
+}
--
2.13.0
next prev parent reply other threads:[~2017-05-19 20:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 20:04 [PATCH v2 0/5] ARM: OMAP2+: AM33XX/AM43XX: Add suspend-resume support Dave Gerlach
2017-05-19 20:04 ` [PATCH v2 1/5] ARM: OMAP2+: Introduce low-level suspend code for AM33XX Dave Gerlach
2017-05-19 20:04 ` [PATCH v2 2/5] ARM: OMAP2+: Introduce low-level suspend code for AM43XX Dave Gerlach
2017-05-19 20:04 ` [PATCH v2 3/5] ARM: OMAP2+: pm33xx-core: Add platform code needed for PM Dave Gerlach
2017-05-22 14:56 ` Tony Lindgren
2017-07-04 13:14 ` Johan Hovold
2017-07-06 19:02 ` Dave Gerlach
2017-05-19 20:04 ` [PATCH v2 4/5] soc: ti: Add pm33xx driver for basic suspend support Dave Gerlach
2017-07-03 16:54 ` Johan Hovold
2017-07-04 13:46 ` Johan Hovold
2017-07-06 19:08 ` Dave Gerlach
2017-07-10 11:46 ` Johan Hovold
2017-05-19 20:04 ` Dave Gerlach [this message]
2017-07-03 16:58 ` [PATCH v2 5/5] ARM: OMAP2+: Create dummy platform_device for pm33xx Johan Hovold
2017-07-06 19:08 ` Dave Gerlach
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=20170519200438.9502-6-d-gerlach@ti.com \
--to=d-gerlach@ti.com \
--cc=j-keerthy@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=ssantosh@kernel.org \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).