[RFC][PATCH 1/4] drivers: sram: Have sram driver probe children nodes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




In order to support sub-nodes with the sram driver,
have the sram driver call of_probe_default_children().

This will allow for supportting sram based reboot reasons.

Cc: Andy Yan <andy.yan@xxxxxxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Thierry Reding <treding@xxxxxxxxxx>
Cc: Heiko Stübner <heiko@xxxxxxxxx>
Cc: Caesar Wang <wxt@xxxxxxxxxxxxxx>
Cc: Kees Cook <keescook@xxxxxxxxxxxx>
Cc: Guodong Xu <guodong.xu@xxxxxxxxxx>
Cc: Haojian Zhuang <haojian.zhuang@xxxxxxxxxx>
Cc: Vishal Bhoj <vishal.bhoj@xxxxxxxxxx>
Cc: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: Android Kernel Team <kernel-team@xxxxxxxxxxx>
Signed-off-by: John Stultz <john.stultz@xxxxxxxxxx>
---
 drivers/misc/sram.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index f84b53d..6830a79 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -23,6 +23,7 @@
 #include <linux/io.h>
 #include <linux/list_sort.h>
 #include <linux/of_address.h>
+#include <linux/of_platform.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
@@ -384,6 +385,8 @@ static int sram_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, sram);
 
+	of_platform_default_populate(pdev->dev.of_node,
+						NULL, &pdev->dev);
 	dev_dbg(sram->dev, "SRAM pool: %zu KiB @ 0x%p\n",
 		gen_pool_size(sram->pool) / 1024, sram->virt_base);
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux