From patchwork Wed Dec 16 15:41:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 7863311 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 57D269F6FA for ; Wed, 16 Dec 2015 15:43:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71C8420396 for ; Wed, 16 Dec 2015 15:43:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 567712038E for ; Wed, 16 Dec 2015 15:43:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752692AbbLPPnE (ORCPT ); Wed, 16 Dec 2015 10:43:04 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:39781 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752442AbbLPPnD (ORCPT ); Wed, 16 Dec 2015 10:43:03 -0500 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NZG02JJLJNC9350@mailout2.samsung.com>; Thu, 17 Dec 2015 00:43:00 +0900 (KST) X-AuditID: cbfee61a-f79266d000003652-65-56718684b3e8 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id BF.C5.13906.48681765; Thu, 17 Dec 2015 00:43:00 +0900 (KST) Received: from amdc1976.localnet ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NZG008BKJNN3800@mmp1.samsung.com>; Thu, 17 Dec 2015 00:43:00 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Viresh Kumar , Lee Jones , "Rafael J. Wysocki" Cc: Stephen Boyd , nm@ti.com, linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, Bartlomiej Zolnierkiewicz , Dmitry Torokhov , Greg Kroah-Hartman , Len Brown , open list , Pavel Machek , Shawn Guo , linux-samsung-soc@vger.kernel.org Subject: [PATCH] PM / OPP: Fix parsing of opp-microvolt and opp-microamp properties Date: Wed, 16 Dec 2015 16:41:40 +0100 Message-id: <18360458.m71vGHrTb9@amdc1976> User-Agent: KMail/4.13.3 (Linux/3.13.0-63-generic; KDE/4.13.3; x86_64; ; ) MIME-version: 1.0 Content-transfer-encoding: 7Bit Content-type: text/plain; charset=us-ascii X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupmkeLIzCtJLcpLzFFi42I5/e+xgG5LW2GYwZY/8hYbZ6xntZjZtJ3V onnxejaL+1+PMlrMmrKXyeL9oWfMFpd3zWGz+Nx7hNFixvl9TBZvfpxlsrh76iibxeMVb9kt fpzpZrF4sUXcYuNXDwd+j9kNF1k8Lvf1Mnks3vOSyWPTqk42jzvX9rB57J+7ht3j9r/HzB59 W1Yxehy/sZ3JY8Xq7+wenzfJBXBHcdmkpOZklqUW6dslcGWcvLWVueA4X8Wtpq+sDYxLeboY OTgkBEwkVvf4dDFyApliEhfurWfrYuTiEBJYyigxafUaKOcro8SxlpOMIFVsAlYSE9tXMYIk RAQaGCWm7lzPBOIwC2xilni36zYzyFhhgVCJPV9zQBpYBFQlnry/ygRi8wpoSax9vBvMFhXw knj/cy4zRFxQ4sfkeywgNrOAvMS+/VNZIWwtifU7jzNNYOSbhaRsFpKyWUjKFjAyr2KUSC1I LihOSs81zEst1ytOzC0uzUvXS87P3cQIjqJnUjsYD+5yP8QowMGoxMOrEVMQJsSaWFZcmXuI UYKDWUmE96FcYZgQb0piZVVqUX58UWlOavEhRmkOFiVx3tpLkWFCAumJJanZqakFqUUwWSYO TqkGxgqxByseq9pxZHHs2KO/87ibRtflHckZ26SCMi/UXojp/nX8QuZvUZmyM9FfQ99P6ldy T3Ptybkg/Kp7e7hv58s9J/sVJx4sZFqzc84x90ni6TP1Y7zDrsxWrLn5YOKVHh+pevYj27Nr grV3u1R/yGqZe/D8Mc4Kp+WWdg9eCp0NCve7Pf3yVyWW4oxEQy3mouJEAGX+1nCeAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_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 Commit 01fb4d3c39d3 ("PM / OPP: Parse 'opp--' bindings") broke support for parsing standard opp-microvolt and opp-microamp properties. Fix it by setting 'name' string to proper value for !dev_opp->prop_name cases. Cc: Viresh Kumar Cc: Lee Jones Cc: Rafael J. Wysocki Fixes: 01fb4d3c39d3 ("PM / OPP: Parse 'opp-- 'bindings") Signed-off-by: Bartlomiej Zolnierkiewicz --- This fixes Exynos4x12 cpufreq-dt support regression present in linux-pm/linux-next tree. Rafael, please apply. Thank you. drivers/base/power/opp/core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/base/power/opp/core.c =================================================================== --- a/drivers/base/power/opp/core.c 2015-12-16 16:10:13.509171420 +0100 +++ b/drivers/base/power/opp/core.c 2015-12-16 16:21:18.385183902 +0100 @@ -806,11 +806,11 @@ static int opp_parse_supplies(struct dev struct property *prop = NULL; char name[NAME_MAX]; + sprintf(name, "opp-microvolt-%s", dev_opp->prop_name); + /* Search for "opp-microvolt-" */ - if (dev_opp->prop_name) { - sprintf(name, "opp-microvolt-%s", dev_opp->prop_name); + if (dev_opp->prop_name) prop = of_find_property(opp->np, name, NULL); - } if (!prop) { /* Search for "opp-microvolt" */ @@ -848,10 +848,10 @@ static int opp_parse_supplies(struct dev /* Search for "opp-microamp-" */ prop = NULL; - if (dev_opp->prop_name) { - sprintf(name, "opp-microamp-%s", dev_opp->prop_name); + sprintf(name, "opp-microamp-%s", dev_opp->prop_name); + + if (dev_opp->prop_name) prop = of_find_property(opp->np, name, NULL); - } if (!prop) { /* Search for "opp-microamp" */