From patchwork Wed Jun 1 20:54:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 69068 Delivered-To: patches@linaro.org Received: by 10.140.23.41 with SMTP id 38csp4846qgo; Wed, 1 Jun 2016 13:54:17 -0700 (PDT) X-Received: by 10.98.23.146 with SMTP id 140mr12831161pfx.122.1464814457550; Wed, 01 Jun 2016 13:54:17 -0700 (PDT) Return-Path: Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com. [2607:f8b0:400e:c00::22f]) by mx.google.com with ESMTPS id s7si53219542pfi.81.2016.06.01.13.54.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Jun 2016 13:54:17 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::22f as permitted sender) client-ip=2607:f8b0:400e:c00::22f; 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::22f as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x22f.google.com with SMTP id b124so21923039pfb.0 for ; Wed, 01 Jun 2016 13:54:17 -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; bh=C6qJSYiVW8lPgAsz/5yv1GfE+dnYoLRhgCoEURvBQ6k=; b=dAlIPvqbAwZZk8zEh/319btHR5dj6PyvR4oL14FYTLnSZAuE096vNCWY+yIoFmAyu0 L7Gals8R+2M12iKdPK8UDLgxyBJN1IoNIlJnCvedHTiUKT57mHV1fFzkxSs/rgkedJXd 8YJ0s/mAjLSifKHlNP21uMyqgUNyuemTPDLZ4= 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; bh=C6qJSYiVW8lPgAsz/5yv1GfE+dnYoLRhgCoEURvBQ6k=; b=bPDxpZEwDHiuXxSeZ6OM2rVscpleA9P4POHecOfxx4kWColIM6be90g/FW04d05MDR pUOk+3rYrgCE+J5g+7eA4Ru9LPteISJYDIxDwvXCjuZUUe/YzlgYxXHoUElqkLtlGO+w d7Vlslrkd1AHtYuynvUlR2pHGQkUp/IVMnuqFwfYnKT4i6q7fEBIlcwpiReyWpdKijx8 QCn+YfeAzxTwL0rDXVb7jonycP8tVw3xK1oc+rdXI6F3FbLR6diWXxBsZFP3tUcs+FDI RYzO80SbMd4HjuC/VWwbx9dWXAG8JJJWq1We8J58RmPFY/b2pYlEVm6f4+zGtCylt/U1 0o4g== X-Gm-Message-State: ALyK8tJjXKhgSniaPmygCxrhJgkN/PGKn/akl4qb5YClrc7cjF9zUkQU0UkquRb1ZZAjhWMt7d8= X-Received: by 10.98.67.7 with SMTP id q7mr12923983pfa.70.1464814457117; Wed, 01 Jun 2016 13:54:17 -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 7sm50233325pfn.30.2016.06.01.13.54.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Jun 2016 13:54:16 -0700 (PDT) From: John Stultz To: Jorge Ramirez Ortiz Cc: John Stultz Subject: [PATCH 2/4] hi655x-pmic: Make hi655x pmic logic probe child nodes in the dt Date: Wed, 1 Jun 2016 13:54:08 -0700 Message-Id: <1464814450-14776-2-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464814450-14776-1-git-send-email-john.stultz@linaro.org> References: <1464814450-14776-1-git-send-email-john.stultz@linaro.org> In trying to wire up the powerkey driver, I found I needed to add this to get the pmic logic to probe child nodes in the dt data. With this patch, child nodes get properly probed. Signed-off-by: John Stultz --- drivers/mfd/hi655x-pmic.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) -- 1.9.1 diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c index 68ab370..20607af 100644 --- a/drivers/mfd/hi655x-pmic.c +++ b/drivers/mfd/hi655x-pmic.c @@ -39,6 +39,16 @@ static const struct regmap_irq hi655x_irqs[] = { { .reg_offset = 0, .mask = RESERVE_INT }, }; +static struct of_device_id of_hi655x_pmic_child_match_tbl[] = { + { .compatible = "hisilicon,hi6552-regulator-pmic", }, + { .compatible = "hisilicon,hi6552-powerkey", }, + { .compatible = "hisilicon,hi6552-usbvbus", }, + { .compatible = "hisilicon,hi6552-coul", }, + { .compatible = "hisilicon,hi6552-pmu-rtc", }, + { .compatible = "hisilicon,hi6552-pmic-mntn", }, + { /* end */ } +}; + static const struct regmap_irq_chip hi655x_irq_chip = { .name = "hi655x-pmic", .irqs = hi655x_irqs, @@ -123,6 +133,9 @@ static int hi655x_pmic_probe(struct platform_device *pdev) platform_set_drvdata(pdev, pmic); + /* populate sub nodes */ + of_platform_populate(np, of_hi655x_pmic_child_match_tbl, NULL, dev); + ret = mfd_add_devices(dev, PLATFORM_DEVID_AUTO, hi655x_pmic_devs, ARRAY_SIZE(hi655x_pmic_devs), NULL, 0, NULL); if (ret) {