From patchwork Fri Oct 10 14:06:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 5065571 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E7B35C11AC for ; Fri, 10 Oct 2014 14:06:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 311F620253 for ; Fri, 10 Oct 2014 14:06:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D62132010E for ; Fri, 10 Oct 2014 14:06:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752664AbaJJOGs (ORCPT ); Fri, 10 Oct 2014 10:06:48 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:49929 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751957AbaJJOGr (ORCPT ); Fri, 10 Oct 2014 10:06:47 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9AE6Nqs027413; Fri, 10 Oct 2014 09:06:23 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9AE6NUt009958; Fri, 10 Oct 2014 09:06:23 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 10 Oct 2014 09:06:23 -0500 Received: from sokoban.home (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9AE6GQs024942; Fri, 10 Oct 2014 09:06:21 -0500 From: Tero Kristo To: , , , , CC: Subject: [REPOST PATCH 2/2] regulator: twl: use platform data in the DT based boot also Date: Fri, 10 Oct 2014 17:06:29 +0300 Message-ID: <1412949989-20186-3-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1412949989-20186-1-git-send-email-t-kristo@ti.com> References: <1412949989-20186-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This allows to pass platform information during a DT boot also, currently this is completely ignored. Needed for supporting the platform specific regulator set_voltage / get_voltage ops for the SMPS regulators. Signed-off-by: Tero Kristo Cc: Liam Girdwood Cc: Mark Brown --- drivers/regulator/twl-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c index 0b4f866..2c4fa06 100644 --- a/drivers/regulator/twl-regulator.c +++ b/drivers/regulator/twl-regulator.c @@ -1103,9 +1103,9 @@ static int twlreg_probe(struct platform_device *pdev) if (match) { template = match->data; id = template->desc.id; + drvdata = dev_get_platdata(&pdev->dev); initdata = of_get_regulator_init_data(&pdev->dev, pdev->dev.of_node); - drvdata = NULL; } else { id = pdev->id; initdata = dev_get_platdata(&pdev->dev);