Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10988570ybi; Thu, 25 Jul 2019 08:08:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqxKAaRHSFck1rMkbG+p2S/9j453nXnXPBmW0jbTXKCZS2tHdPb/PPli7s0idaSSLt6aOXuK X-Received: by 2002:a62:1c5:: with SMTP id 188mr16469053pfb.26.1564067331165; Thu, 25 Jul 2019 08:08:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564067331; cv=none; d=google.com; s=arc-20160816; b=Xtzm3NME3h3wjkD4hn6aXSMq0uBRAccnPS1KEEuYldIRov44VKjqcdTgetIQV+xR20 kDJafo3vSJiTq4hCWKKhIJu8AnrZbRa1VE2EPWRPcB7tOo0d+YvftQXBy5YoFJ23Wd2Z TRGIRmg3WG8T7W3mtIzajrHYQeDxvJGLrJ42tuo2gAcKMcUbq9Ptwag3DmAYcvSn6sjZ /bBRaDNW8LLCx1hcTmMYAe37aZtTphRMf2BTl2eqc9l7u7aZ4I5TF37z6CgiLorKsyYz kRfvvyuhM8Kn9vnLiVc81xmnHY8jkPNQpCER95za92ukgfD4W7MBYPsIf8BD6BMyivoh sdUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=KMR+yHrr6Lsx+SAlQwuxyLppRvSG65o1a3cPzAiZ3eY=; b=XUjHtwzPFE7hiI4zhKaLnnwBQ/poL5YxUTMRYweRbG3EVBo47CbxCuG90pOHLy0r6z B7CKbN7R/oC1LjeRRTJ1bNflUQf6vJdDbsuQ6oo5+QE+/SMOVFxZ/RxdUJWfQ+VtT9yn zl9MSvWnSHtt2836EpQEeUcbqzWg0BFY97A2Bh4pGlU85YEl7NSTTAQRYvMExYj7PnAe W9ZqcKI7+edzMQWIWjAvQrX9exVeEP/pQS1Orh/IhmzWhsu81cqB77Q9hhNLQwpOb5ve C14mGQk2aRFWRtYrkAgYyArbqgCxRxz0DASdv8MBb60+ZSHsGjCP0Ja0gxvIohtGcjDG uH9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=quKUtOtc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r4si23132547pfg.26.2019.07.25.08.08.35; Thu, 25 Jul 2019 08:08:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=quKUtOtc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388972AbfGYPHf (ORCPT + 99 others); Thu, 25 Jul 2019 11:07:35 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:49949 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388899AbfGYPHf (ORCPT ); Thu, 25 Jul 2019 11:07:35 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20190725150733euoutp022bc1098f0fddd83b247aa85b241c2952~0ruFmVQN82510825108euoutp022 for ; Thu, 25 Jul 2019 15:07:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190725150733euoutp022bc1098f0fddd83b247aa85b241c2952~0ruFmVQN82510825108euoutp022 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1564067253; bh=KMR+yHrr6Lsx+SAlQwuxyLppRvSG65o1a3cPzAiZ3eY=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=quKUtOtcSVLSKjsQ6VPUnGaY07Abnm03laIrVGXSYKyhJrtTVozzcubYVQTyNVMqI 8JS6zR3tg/Ywh6sEwG6Be/c+L1OmD81Wa/hFOln1eHZrTkbRWp90SUWNpIV9e3yPNU /QGBJBJ1A1XD/kTYhbaoyt+FvdmsDXFeKqRv97ns= Received: from eusmges3new.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190725150732eucas1p1b60118aafc1452cfd76098ce4cfc2f9e~0ruE0-g-w1842318423eucas1p1N; Thu, 25 Jul 2019 15:07:32 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges3new.samsung.com (EUCPMTA) with SMTP id B2.54.04325.4B5C93D5; Thu, 25 Jul 2019 16:07:32 +0100 (BST) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190725150731eucas1p298d791d9323c8a01c55549d8419d4a08~0ruD_4PB71393413934eucas1p2h; Thu, 25 Jul 2019 15:07:31 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190725150731eusmtrp1d6c4b6a66e45b632987803de77157a7c~0ruDwcD9q2337023370eusmtrp1k; Thu, 25 Jul 2019 15:07:31 +0000 (GMT) X-AuditID: cbfec7f5-b75ff700000010e5-76-5d39c5b496a1 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 84.C0.04146.3B5C93D5; Thu, 25 Jul 2019 16:07:31 +0100 (BST) Received: from [106.120.51.18] (unknown [106.120.51.18]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20190725150730eusmtip21bae62c8558c204244444a32360ef201~0ruDAG6Dz1452814528eusmtip2T; Thu, 25 Jul 2019 15:07:30 +0000 (GMT) Subject: Re: [PATCH v4 1/5] devfreq: exynos-bus: correct clock enable sequence To: cwchoi00@gmail.com Cc: Bartlomiej Zolnierkiewicz , Marek Szyprowski , Chanwoo Choi , Krzysztof Kozlowski , Kukjin Kim , Kyungmin Park , Mark Rutland , MyungJoo Ham , Nishanth Menon , Rob Herring , Stephen Boyd , Viresh Kumar , devicetree , linux-arm-kernel , linux-kernel , Linux PM list , linux-samsung-soc From: Kamil Konieczny Message-ID: Date: Thu, 25 Jul 2019 17:07:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA02SWUwTURSGvZ2ZzkAsuRaUE9ybaBADaNRw3Zeo6aP45ALRChNQW9QOi2ii BVwJIKJRqQiIxRJksQUFUQmBYtkJGgUhhLK5ggmLW1CRdmrk7Tv/+c89508uR8k/M17c4YhI XhuhUiukrvTjFz9bfEtr1wavKG5eSky3ihnSPv6eIe9ql5MsSwtDrvR/pkhr60OWNMcPscTc /4YhryoypGQs2YLIrdZKCSm0dLMkt71NQrri8qRk6EezhJx/bmHJnzcmmpTYXki3yJUFmQVI +UTfzSrN+ZelyhLDWWVKaT5SWjvKJMox84Jd7D7XDaG8+nA0r/XfdNA1PH3wrfR42fyTxTkF Eh3q8UhELhzg1VCffJ5ORK6cHOchMFQYGLEYRzCR3YfEYgxB/Ogg+jeSbOh1uowIRr7nsWIx jOCe0UTZXe54FxSaciR29sBzoOzGgOMpCrcw8OrtA0dDigOgr6zJwTK8E+LTXzqYxkvgY66O tfNsvAdGbTWM6JkF9ekDtJ1dcCAkFLY6/BT2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W2cwTGIVmIWmfhaRlFpKW WUhaFjCyrGIUSS0tzk3PLTbUK07MLS7NS9dLzs/dxAiM+m3Hfm7ewXhpY/AhRgEORiUe3gvL LWOFWBPLiitzDzFKcDArifBu3QEU4k1JrKxKLcqPLyrNSS0+xGgK9NxEZinR5HxgQsoriTc0 NTS3sDQ0NzY3NrNQEuftEDgYIySQnliSmp2aWpBaBNPHxMEp1cAYzKF6qjpsx/3Sr/wd3NeE a1dcmxL9+8LyNflsmTdC554yu76D+2S/YKaUYfYPTdvIxK+N16cHpTxaZbbGTurSDOngtwfv cDmr7Hlyy/H/KUvXjX0K/Gdr5e5kbCxxXPiTZ1rbKsc1V2LjnL2OXSloXalun1bFdFVv2Ynt h47sXrc3WfPU+eyXSizFGYmGWsxFxYkACYpdWhADAAA= X-CMS-MailID: 20190725150731eucas1p298d791d9323c8a01c55549d8419d4a08 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190725144325eucas1p1463ecde90f9c93cb73d3c54c7cf3f1ff X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190725144325eucas1p1463ecde90f9c93cb73d3c54c7cf3f1ff References: <20190725144300.25014-1-k.konieczny@partner.samsung.com> <20190725144300.25014-2-k.konieczny@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 25.07.2019 16:59, Chanwoo Choi wrote: > Hi, > > You are missing my Acked tag. I changed code, so I can not add your Ack in v4. Please send new Ack for this patch. > 2019년 7월 25일 (목) 오후 11:44, 님이 작성: >> >> Regulators should be enabled before clocks to avoid h/w hang. This >> require change in exynos_bus_probe() to move exynos_bus_parse_of() >> after exynos_bus_parent_parse_of() and change in error handling. >> Similar change is needed in exynos_bus_exit() where clock should be >> disabled before regulators. >> >> Signed-off-by: Kamil Konieczny >> --- >> Changes: >> v4: >> - move regulator disable after clock disable >> - remove unrelated changes >> - add disabling regulators in error path in exynos_bus_probe() >> >> --- >> drivers/devfreq/exynos-bus.c | 31 +++++++++++++++++-------------- >> 1 file changed, 17 insertions(+), 14 deletions(-) >> >> diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c >> index 486cc5b422f1..f34fa26f00d0 100644 >> --- a/drivers/devfreq/exynos-bus.c >> +++ b/drivers/devfreq/exynos-bus.c >> @@ -194,11 +194,10 @@ static void exynos_bus_exit(struct device *dev) >> if (ret < 0) >> dev_warn(dev, "failed to disable the devfreq-event devices\n"); >> >> - if (bus->regulator) >> - regulator_disable(bus->regulator); >> - >> dev_pm_opp_of_remove_table(dev); >> clk_disable_unprepare(bus->clk); >> + if (bus->regulator) >> + regulator_disable(bus->regulator); >> } >> >> /* >> @@ -386,6 +385,7 @@ static int exynos_bus_probe(struct platform_device *pdev) >> struct exynos_bus *bus; >> int ret, max_state; >> unsigned long min_freq, max_freq; >> + bool passive = false; >> >> if (!np) { >> dev_err(dev, "failed to find devicetree node\n"); >> @@ -399,27 +399,27 @@ static int exynos_bus_probe(struct platform_device *pdev) >> bus->dev = &pdev->dev; >> platform_set_drvdata(pdev, bus); >> >> - /* Parse the device-tree to get the resource information */ >> - ret = exynos_bus_parse_of(np, bus); >> - if (ret < 0) >> - return ret; >> - >> profile = devm_kzalloc(dev, sizeof(*profile), GFP_KERNEL); >> - if (!profile) { >> - ret = -ENOMEM; >> - goto err; >> - } >> + if (!profile) >> + return -ENOMEM; >> >> node = of_parse_phandle(dev->of_node, "devfreq", 0); >> if (node) { >> of_node_put(node); >> - goto passive; >> + passive = true; >> } else { >> ret = exynos_bus_parent_parse_of(np, bus); >> + if (ret < 0) >> + return ret; >> } >> >> + /* Parse the device-tree to get the resource information */ >> + ret = exynos_bus_parse_of(np, bus); >> if (ret < 0) >> - goto err; >> + goto err_reg; >> + >> + if (passive) >> + goto passive; >> >> /* Initialize the struct profile and governor data for parent device */ >> profile->polling_ms = 50; >> @@ -510,6 +510,9 @@ static int exynos_bus_probe(struct platform_device *pdev) >> err: >> dev_pm_opp_of_remove_table(dev); >> clk_disable_unprepare(bus->clk); >> +err_reg: >> + if (!passive) >> + regulator_disable(bus->regulator); >> >> return ret; >> } >> -- >> 2.22.0 >> > > -- Best regards, Kamil Konieczny Samsung R&D Institute Poland