ARM: msm: register msm soc bus device
This is a temporary change which allows both upstream
socinfo and legacy socinfo to co-exist, for userspace
to move to the new socinfo interface. It also adds a
soc device and then populates all devices as children
of this soc node.
Implications:
Socinfo directory in sys will change from
/sys/devices/system/soc#/ to
/sys/devices/soc#/
Change-Id: I4453e2d7eeed333730ca8bafede18ddc551b69e0
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-8092.c b/arch/arm/mach-msm/board-8092.c
index cbd257f..c7d01bf 100644
--- a/arch/arm/mach-msm/board-8092.c
+++ b/arch/arm/mach-msm/board-8092.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, Code Aurora Forum. All rights reserved.
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -10,6 +10,7 @@
* GNU General Public License for more details.
*/
+#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/of.h>
@@ -78,9 +79,6 @@
static void __init mpq8092_map_io(void)
{
msm_map_mpq8092_io();
- if (socinfo_init() < 0)
- pr_err("%s: socinfo_init() failed\n", __func__);
-
}
static struct of_dev_auxdata mpq8092_auxdata_lookup[] __initdata = {
@@ -98,6 +96,11 @@
static void __init mpq8092_init(void)
{
struct of_dev_auxdata *adata = mpq8092_auxdata_lookup;
+ struct device *parent;
+
+ parent = socinfo_init();
+ if (IS_ERR_OR_NULL(parent))
+ pr_err("%s: socinfo_init() failed\n", __func__);
mpq8092_init_gpiomux();
msm_clock_init(&mpq8092_clock_init_data);