Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2935968imu; Sun, 27 Jan 2019 17:19:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN5zG94Uv/euPtHWebnPKVkydNg6p4FO9foOjlKIPymP1LwpnwCQanwb0yUg/EeonxINOnl+ X-Received: by 2002:a63:381c:: with SMTP id f28mr18085598pga.330.1548638378320; Sun, 27 Jan 2019 17:19:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548638378; cv=none; d=google.com; s=arc-20160816; b=C1KxgrjBkRSMxBX2BWmE+AZeswLmOXMy20OH4C/qOnYjALslGFT1H81th9pAjS+oiD OH8IqC2I7qMnEWOJ7aqzCLBzxULOqbkE2hY2Gmq0s3VAY9FjCe6cE9/K08rATu/g9VME /5LLD2YF8/ZDcXPnklWhBp/solwexwkELIAUtdGlTaTfCKjQIrB+jBQaNLAYk0xncwOP vkcPmDb++Um77rDsCC/lkwtrKbHnVee456xqmGMroUQiOFBV5/CY/rMciyibR2tcvhgL Rzb7Tz0ko9bWrKFbt/Q0KozM5b4mfkuVqKxtP0/Qcl4K63R92x9Fa5HUsQ3qWwYFVJG+ VdMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:organization:from:cc:to:subject :dkim-signature:dkim-filter; bh=4dbqkuLrD2qHSkeaEY04pic09bbzd11BSwqiPHnj55I=; b=hNzdXRjK5Em3y4xhc7DW29VVCsJn3d1Jz+9ArB9ouzWTfQPoiVgbiTsVH/zqgPw188 6eiHSfQoJ7+HNSQvpEAJ/7DPp32cGdiKYG0Z9j3w8CTPob47krGnTNXCt34tJUzIzBEu kLYUjD/dhf2du5bCcc8Pz2H73rR78EuoSVOrF64CISh3oADxnhisyj6L2VKOOyZijL1J SCFvfWexU1R6z4kdqkdpS9ggHp5ykG226+sjkDcR312C0QTFd2yBbg+/Yo0l6vSAdebg 8UWqeXq2cSXJum4SIDfdWN1MowdZEUviMdu5rt4kkwnsTDnbatOWBylEeZMGe1sUHivU 18IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=rmgl+jQy; 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 v6si31890401pfv.181.2019.01.27.17.18.56; Sun, 27 Jan 2019 17:19:38 -0800 (PST) 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=rmgl+jQy; 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 S1726661AbfA1BR0 (ORCPT + 99 others); Sun, 27 Jan 2019 20:17:26 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:28729 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbfA1BR0 (ORCPT ); Sun, 27 Jan 2019 20:17:26 -0500 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20190128011722epoutp03094e0f58413dc04139b2bdfef4d47542~93kbUjf0E3276332763epoutp032 for ; Mon, 28 Jan 2019 01:17:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20190128011722epoutp03094e0f58413dc04139b2bdfef4d47542~93kbUjf0E3276332763epoutp032 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548638242; bh=4dbqkuLrD2qHSkeaEY04pic09bbzd11BSwqiPHnj55I=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=rmgl+jQy/CG+wORrKFC6/4lWN2+/pP1TWMi0oNBBpz+0gMJmi4XOReybhP+gjjLCq AF4JIWFun6nQdurWXfP/Qal1PUtUM4Vhuj5bf3lGwe954wiCUNfmaAz/+UDmT3oY5w nTBlrlcKPcKcmypHNj3slXtHdK7Qf8n9TT9o0zuc= Received: from epsmges1p4.samsung.com (unknown [182.195.40.154]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20190128011718epcas1p19fabc8f3192c0326b535cccd6c8918e5~93kXTtCk92826028260epcas1p1n; Mon, 28 Jan 2019 01:17:18 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 10.B7.04288.E185E4C5; Mon, 28 Jan 2019 10:17:18 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20190128011717epcas1p4640a89c2f5414bb5f0122f4143a39fcc~93kWt-3v92854728547epcas1p4U; Mon, 28 Jan 2019 01:17:17 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20190128011717epsmtrp1523b13c4365d333646f768a1b43fa8c5~93kWoRhKW1607716077epsmtrp1b; Mon, 28 Jan 2019 01:17:17 +0000 (GMT) X-AuditID: b6c32a38-bf7ff700000010c0-33-5c4e581eb770 Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 6E.3A.03971.D185E4C5; Mon, 28 Jan 2019 10:17:17 +0900 (KST) Received: from [10.113.221.102] (unknown [10.113.221.102]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190128011717epsmtip178dba79fcf4c82620e56d08a2ac4e7ff~93kWYOUOy1072510725epsmtip1c; Mon, 28 Jan 2019 01:17:17 +0000 (GMT) Subject: Re: [PATCH] devfreq: Suspend all devices on system shutdown To: Marek Szyprowski , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: MyungJoo Ham , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Lukasz Luba , Markus Reichl From: Chanwoo Choi Organization: Samsung Electronics Message-ID: <9fbfc35c-9448-f1ae-6e47-7d5f6bba22de@samsung.com> Date: Mon, 28 Jan 2019 10:17:17 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190125135403.10228-1-m.szyprowski@samsung.com> Content-Language: en-US Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA01SbUhTYRTu3d3u7szVdWadpHRd6YeCHzddXSMlVGKRhVA/RIR1cTcV99W9 UyqjLEPLSo3MdGlKMiqjlh+VhTVyM5EoF/apiUaiZWFQKUVEbbuL/Pc8z/scznnOewhMdQMP JwpNVo43sQYKD5LedkXHxkZk78hNmD0XxnQ0OGTM0NBNOTNStooZvteEM99OuxHTMPRAwnx0 /0DMdfeYnBk9cgXfrNCOvD2s7Ww/gWsfzvZKtNXd7Uj7rTMiS5ZTtKmAY/Ucr+ZMeWZ9oSk/ hdq2U5eu06xPoGPpZGYDpTaxRi6FysjMit1SaPCOQ6lLWEOxV8piBYGKT93Em4utnLrALFhT KM6iN1iSLXECaxSKTflxeWbjRjohYZ3Ga9xdVNDROCG1/FHuq3uUUobuLq5CCgLIJHA5KqRV KIhQkT0I3n1qwkTyFYGzuTZA5hG01XfJ/pWcn/HIxYf7CFob6nGRfEEw3/UY87lCyQyoqXzq dy0jqxFcs7tlPoKREwha3nokPhdOxoDz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VjJKpBcW56bnFhgWGeanlesWJucWleel6 yfm5mxjBsaWluYPx8pL4Q4wCHIxKPLwb/vvGCLEmlhVX5h5ilOBgVhLh9dgOFOJNSaysSi3K jy8qzUktPsQozcGiJM77NO9YpJBAemJJanZqakFqEUyWiYNTqoHRKMP6wKOLnQ9zZzac2a2x fV/D9KDvQq6uIewsqxUeFzKtuPE72FthoV34TZOuJ84sF98kWm4RvHL6cFyHnvFnU5tmv6Ox j1uemMyuP79S0mdj3ZI3/nc2SZ398rUn8k3WhCTbi+L790+a8NzFQdXdYotP7uulb6PfKS/7 /+r7pmMyy7z/icz3VWIpzkg01GIuKk4EAD2m98ypAgAA X-CMS-MailID: 20190128011717epcas1p4640a89c2f5414bb5f0122f4143a39fcc X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20190125135414eucas1p2ffc71c63f1a27f67d076dec889954b40 References: <20190125135403.10228-1-m.szyprowski@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 19. 1. 25. 오후 10:54, Marek Szyprowski wrote: > This way devfreq core ensures that all its devices will be set to safe > operation points before reboot operation. There are board on which some > aggressive power saving operation points are behind the capabilities of > the bootloader to properly reset the hardware and boot the board. This > way one can avoid board crash early after reboot. > > Similar pattern is used in CPUfreq subsystem. > > Reported-by: Markus Reichl > Signed-off-by: Marek Szyprowski > --- > drivers/devfreq/devfreq.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c > index 0ae3de76833b..f6aba8344c56 100644 > --- a/drivers/devfreq/devfreq.c > +++ b/drivers/devfreq/devfreq.c > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -1422,6 +1423,10 @@ static struct attribute *devfreq_attrs[] = { > }; > ATTRIBUTE_GROUPS(devfreq); > > +static struct syscore_ops devfreq_syscore_ops = { > + .shutdown = devfreq_suspend, > +}; > + > static int __init devfreq_init(void) > { > devfreq_class = class_create(THIS_MODULE, "devfreq"); > @@ -1438,6 +1443,8 @@ static int __init devfreq_init(void) > } > devfreq_class->dev_groups = devfreq_groups; > > + register_syscore_ops(&devfreq_syscore_ops); > + > return 0; > } > subsys_initcall(devfreq_init); > Looks good to me. Reviewed-by: Chanwoo Choi -- Best Regards, Chanwoo Choi Samsung Electronics