From patchwork Mon Apr 7 12:15:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 3944981 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E554B9F391 for ; Mon, 7 Apr 2014 12:18:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2FFE8201CE for ; Mon, 7 Apr 2014 12:18:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5733D202A1 for ; Mon, 7 Apr 2014 12:18:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755251AbaDGMRs (ORCPT ); Mon, 7 Apr 2014 08:17:48 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:32200 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753408AbaDGMRl (ORCPT ); Mon, 7 Apr 2014 08:17:41 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N3N009WHU56FU40@mailout2.w1.samsung.com>; Mon, 07 Apr 2014 13:17:30 +0100 (BST) X-AuditID: cbfec7f4-b7f796d000005a13-23-534297629a1a Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 52.45.23059.26792435; Mon, 07 Apr 2014 13:17:38 +0100 (BST) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N3N00HWTU5B4S50@eusync2.samsung.com>; Mon, 07 Apr 2014 13:17:38 +0100 (BST) From: Krzysztof Kozlowski To: Sangbeom Kim , Liam Girdwood , Mark Brown , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: Kyungmin Park , Marek Szyprowski , Bartlomiej Zolnierkiewicz , Tomasz Figa , Krzysztof Kozlowski Subject: [PATCH 1/2] regulator: s5m8767: Fix carried over ena_gpio assignment Date: Mon, 07 Apr 2014 14:15:23 +0200 Message-id: <1396872924-14675-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrGJMWRmVeSWpSXmKPExsVy+t/xK7pJ052CDU6+l7XYOGM9q8XUh0/Y LF6/MLQ42/SG3eLblQ4mi8u75rBZzDi/j8li7ZG77BYXV3xhslg/4zWLA5fHzll32T02repk 8+jbsorR4/MmuQCWKC6blNSczLLUIn27BK6MnzvvsRXc46y42HSaqYFxGkcXIyeHhICJxMSN K5ghbDGJC/fWs3UxcnEICSxllHi55xULhNPHJLHowykWkCo2AWOJzcuXgFWJCGxklDi4/zAr SIJZ4DmjxNPv4V2MHBzCAr4Sx+akgoRZBFQlTnRPByvhFXCXuHBjMhtIiYSAgsScSTYTGLkX MDKsYhRNLU0uKE5KzzXUK07MLS7NS9dLzs/dxAgJmy87GBcfszrEKMDBqMTDG3DAMViINbGs uDL3EKMEB7OSCK9hl1OwEG9KYmVValF+fFFpTmrxIUYmDk6pBsZK/iTNLma9ek5VlwOTfurs 1z+ycVOsc6OP8dHP9T4qnko/2wyOHBXZ807eq5Yn7q9jUo2RwjWF1Q/e3XtScnStjHadoby9 isWi1z6LrRO62tcIzmZ5d03Wv3TVmvn3EyyfaOpFHCz9YfLFzWPjFxvTEJ7H/373eRya6Drd e5ki08ras5y3gpRYijMSDbWYi4oTAZw8s+z5AQAA 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=-7.2 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 During registration of regulators if external control for regulator was set in DTS the ena_gpio and ena_gpio_flags fields of regulator_config were set to proper values. However the same regulator_config was used in next iterations of loop so the ena_gpio fields carried over to next regulators. The issue was not observed as ena_gpio is supported only for Buck9 regulator which is often the last regulator parsed from DTS. Be sure to clear ena_gpio config fields before registering the regulator. Signed-off-by: Krzysztof Kozlowski --- drivers/regulator/s5m8767.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c index f05badabd69e..92f19a005dc3 100644 --- a/drivers/regulator/s5m8767.c +++ b/drivers/regulator/s5m8767.c @@ -964,6 +964,7 @@ static int s5m8767_pmic_probe(struct platform_device *pdev) config.driver_data = s5m8767; config.regmap = iodev->regmap_pmic; config.of_node = pdata->regulators[i].reg_node; + config.ena_gpio = config.ena_gpio_flags = 0; if (pdata->regulators[i].ext_control_gpio) s5m8767_regulator_config_ext_control(s5m8767, &pdata->regulators[i], &config);