From patchwork Wed Aug 3 23:05:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 73231 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1098998qga; Wed, 3 Aug 2016 16:05:30 -0700 (PDT) X-Received: by 10.66.161.195 with SMTP id xu3mr119374270pab.68.1470265530761; Wed, 03 Aug 2016 16:05:30 -0700 (PDT) Return-Path: Received: from mail-pf0-x22b.google.com (mail-pf0-x22b.google.com. [2607:f8b0:400e:c00::22b]) by mx.google.com with ESMTPS id o78si11031370pfi.291.2016.08.03.16.05.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 16:05:30 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22b as permitted sender) client-ip=2607:f8b0:400e:c00::22b; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22b as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x22b.google.com with SMTP id p64so81694370pfb.1 for ; Wed, 03 Aug 2016 16:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9bw8ZJUZLTiEyJ+dS653OKVYHm3xDq9Ntu9ojBLybVo=; b=RiuvsfQSAidBDElJDexH7VhizV69Zoy8qKrfKGy+fu83RPMzpz10drqwl3He+/sLVl SAjtwFPWr9Ea2aPSWZCjBKPeq4q44yflIfKhVKFgUKE8tsEQ/C6s7JE8soslaRb5MhKQ ZqgQe+eg6ZgomgbvE1X4zrZKDF8WGdgNoMrGU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9bw8ZJUZLTiEyJ+dS653OKVYHm3xDq9Ntu9ojBLybVo=; b=KgwWKG9LB7/etTUNaJ/k2fk3eO7BFQhmyNtY4I5Ukkci9td7qdbFIKrHItg5PaLFl1 sjg8TBoGJeoqx/+hd9wsk3+B4SwzCWVoLbQAna2KTKasLM1BGIXQYQlZzlqNikNCKMCq l4++AXRqRH8EVhfoEDHehLFmDtBxORhblUbgzsoQu0RAqDRr/OlYjJUtb0pr4xJY+raZ +Zh2ZoygezkwHp0e6mWMGhe7pQcr2ucw3xVcTyVpNsGlCVFlmIdGZxUZ5S/HfCfSR0om 2UszqV5Cdq3Nq3ggjOBZLVxwr2CaspKa7XtvmKszVrGhbN1bxp6F05Y07URr5xDER/pR Ujbg== X-Gm-Message-State: AEkooutdptwpRBcYsgug8znrLGhiVIhHvgjABU7WI+FK7rfoOduuS9lSbdp/A6WWH3nFpAV+pC4= X-Received: by 10.98.20.201 with SMTP id 192mr121505160pfu.144.1470265530523; Wed, 03 Aug 2016 16:05:30 -0700 (PDT) Return-Path: Received: from localhost.localdomain (c-73-67-244-238.hsd1.or.comcast.net. [73.67.244.238]) by smtp.gmail.com with ESMTPSA id m24sm15050482pfi.34.2016.08.03.16.05.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 16:05:30 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Andy Yan , Rob Herring , Arnd Bergmann , Thierry Reding , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Caesar Wang , Kees Cook , Guodong Xu , Haojian Zhuang , Vishal Bhoj , Bjorn Andersson , devicetree@vger.kernel.org, Android Kernel Team Subject: [RFC][PATCH 1/4] drivers: sram: Have sram driver probe children nodes Date: Wed, 3 Aug 2016 16:05:20 -0700 Message-Id: <1470265523-27557-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1470265523-27557-1-git-send-email-john.stultz@linaro.org> References: <1470265523-27557-1-git-send-email-john.stultz@linaro.org> MIME-Version: 1.0 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 Cc: Rob Herring Cc: Arnd Bergmann Cc: Thierry Reding Cc: Heiko Stübner Cc: Caesar Wang Cc: Kees Cook Cc: Guodong Xu Cc: Haojian Zhuang Cc: Vishal Bhoj Cc: Bjorn Andersson Cc: devicetree@vger.kernel.org Cc: Android Kernel Team Signed-off-by: John Stultz --- drivers/misc/sram.c | 3 +++ 1 file changed, 3 insertions(+) -- 1.9.1 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 #include #include +#include #include #include @@ -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);