From patchwork Fri Jun 3 22:11:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 69301 Delivered-To: patches@linaro.org Received: by 10.140.106.246 with SMTP id e109csp477112qgf; Fri, 3 Jun 2016 15:11:34 -0700 (PDT) X-Received: by 10.98.63.216 with SMTP id z85mr8430794pfj.53.1464991892441; Fri, 03 Jun 2016 15:11:32 -0700 (PDT) Return-Path: Received: from mail-pf0-x230.google.com (mail-pf0-x230.google.com. [2607:f8b0:400e:c00::230]) by mx.google.com with ESMTPS id i20si9959024pfd.165.2016.06.03.15.11.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jun 2016 15:11:32 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c00::230 as permitted sender) client-ip=2607:f8b0:400e:c00::230; 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::230 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pf0-x230.google.com with SMTP id 62so47554217pfd.1 for ; Fri, 03 Jun 2016 15:11:32 -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=glTgHMSrQwtcGIRWujjOmI1lJYwk/TlKdLs+J1OLjuo=; b=AnUeHOv4nvwaBnOf7LhMgttWtmripp+Vqdo5F+HkywYECBZ5sJkYmMAusUanpCEC7n 7gQIEMdHtrRF6FTwc0Jf29CTZ8b7rDjB4vk+75gQQMtALkVYtItooqyBmf9UiM7WPMyf PJyN/H128UYfTBQw5qX8e1xi3Fwj99zjdXpuk= 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=glTgHMSrQwtcGIRWujjOmI1lJYwk/TlKdLs+J1OLjuo=; b=ipKT3/KRdzSHVOEIfT724xITIWNcPXDCqetx2+0VxaIbzS3GQKd90v0+eIO1PFK9i+ 3oRkg13+BCoVxqGd5Hcvh9GQEz6tR9hWI/BqtXbOweYPCtviZ0K2E1f7XR8qTZnL+Io8 NCNpheIFhpxSCK2F/xnjOZjmGaW80n0kiNivxcjW1zGagoIj5BlMQk5rzt7Dskl2sWNv xNAfRAyDvLvDgyW40S8DMUGfMHfx/GQ327LeoOfWUVd/lu5Sr9KecoAfUcr4S5h3BF/S 6PzfPBm54FifMpFJULBKafbYZSNbROsnjQNQlLNDRu/D9cXROcm+hbSFHfiNb+i5tsPX MmVA== X-Gm-Message-State: ALyK8tLKR8A/s7tdjLHG1Fi0wRRODPvsC7bJvcYagr5cx30XdDmqlz0FfvzrpG6+xFhACqRXRh0= X-Received: by 10.98.8.69 with SMTP id c66mr8614001pfd.47.1464991892132; Fri, 03 Jun 2016 15:11:32 -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 d184sm10596841pfc.56.2016.06.03.15.11.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jun 2016 15:11:31 -0700 (PDT) From: John Stultz To: lkml Cc: John Stultz , Dmitry Torokhov , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Jorge Ramirez-Ortiz , Wei Xu , Guodong Xu Subject: [PATCH 2/5] hi655x-pmic: Make hi655x pmic logic probe child nodes in the dt Date: Fri, 3 Jun 2016 15:11:23 -0700 Message-Id: <1464991886-632-3-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464991886-632-1-git-send-email-john.stultz@linaro.org> References: <1464991886-632-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. Cc: Dmitry Torokhov Cc: Rob Herring Cc: Pawel Moll Cc: Mark Rutland Cc: Ian Campbell Cc: Kumar Gala Cc: Lee Jones Cc: Jorge Ramirez-Ortiz Cc: Wei Xu Cc: Guodong Xu Signed-off-by: John Stultz --- drivers/mfd/hi655x-pmic.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 1.9.1 diff --git a/drivers/mfd/hi655x-pmic.c b/drivers/mfd/hi655x-pmic.c index 05ddc78..3511035 100644 --- a/drivers/mfd/hi655x-pmic.c +++ b/drivers/mfd/hi655x-pmic.c @@ -39,6 +39,11 @@ static const struct regmap_irq hi655x_irqs[] = { { .reg_offset = 0, .mask = RESERVE_INT }, }; +static const struct of_device_id of_hi655x_pmic_child_match_tbl[] = { + { .compatible = "hisilicon,hi6552-powerkey", }, + { /* end */ } +}; + static const struct regmap_irq_chip hi655x_irq_chip = { .name = "hi655x-pmic", .irqs = hi655x_irqs, @@ -122,6 +127,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) {