Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1511592imj; Fri, 8 Feb 2019 02:44:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IZfJpJpk960hoe8hoLsqOZFCg98qrV4EFdRB0sCJvjSKW6crcCQBuZsX8eHupy2eRyu7OgO X-Received: by 2002:a17:902:9006:: with SMTP id a6mr21674292plp.334.1549622687347; Fri, 08 Feb 2019 02:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549622687; cv=none; d=google.com; s=arc-20160816; b=sOuba+awpb0fKYQHrkAc2Ency+WLOaR4+ZOggm576ilMjrcsAZZZOEoKGXxsnCS9R+ 292LvJu+0c8V4TFu6AL+7gvlv/V9qLhHE2TSoygfuBhorVtAnIPHCv/pwXmfZEnRMzV5 lNAfYPS2jqRSGZMzZ+x/zr8TAX24YVykZomGUh5GHFzz8OwVvLK339eewIaSwI/QrLBN ORgWpUqGejNzYOZG1a4oWyiOjKemieyA00BJoBGWEOUBCIanzxs7I2g61OFXRm0y1CtH Oyda9OtjjPnDKYjmkqXDNKmxf9W9YW+SpvxB81Zzv6m27xCfw8t7oPyaGToRhfc4QOoJ VIFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=EP9I9wZegAeBvx7ax3FI65LK3eR2rTPkHdcR23z8Omk=; b=VaLnBvIP7nUehjRFQ6rGLmOoDFm4+6mCl0mPfz7tHtChsDTZbIJFlBuhwXbvmsQhuz Qb3VdjA5Cmrvc7DZEXThdhKXB9Y9zPmRNyVF7tQqEsNXjNBcLq1LA8wzFckGykIDHy2u VYpDXrfwGcYz1bwFJDzl2LBtF4jiVNVWJLlxr9Cyze6Il/MJvRTtzpqOOqTaleateg3e Leg/86Uuke5MynX22WNJOd0jMhakMk2lYBthVpzGVX2a9cIdJtQq3D3QlR5kRnzdXjPw dzHvZCbk6FtlTXCLU0V9hh7zlkVkt7lpA+usY132qNJitvZNbZ1/U5g2xJ8yzY9bz0zQ dyRQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z18si1789326pgk.367.2019.02.08.02.44.31; Fri, 08 Feb 2019 02:44:47 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727708AbfBHKmd (ORCPT + 99 others); Fri, 8 Feb 2019 05:42:33 -0500 Received: from mail-ot1-f67.google.com ([209.85.210.67]:39936 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbfBHKmc (ORCPT ); Fri, 8 Feb 2019 05:42:32 -0500 Received: by mail-ot1-f67.google.com with SMTP id s5so5058623oth.7; Fri, 08 Feb 2019 02:42:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EP9I9wZegAeBvx7ax3FI65LK3eR2rTPkHdcR23z8Omk=; b=U8AzMjTVF37rTyOVHUoJy7+WZNulRrei0QFLO698a0nuRGWYzXlQ1Mt1yZo5QAeagu PDUDp7vryqiJZpN0R0/JujHHK40xYmrbpcJ1s3AVseWe8zrPulUoDt+LmpdRdPDwlZOL XtW+bsGqpM5FeiFt37OcsUdI0h9/dgopwicqhK4prcDoSTPAvhGmdjG+8VbKghhOqEiA VldhTzKBNv9umpcxGu8J8ZOtkR15u3KHYhJ+HZ+fbTcSleSRLPnsd4iGuIx6CJWZLcLh /58R5Y0SGwLEOPrcJ/FLe48vhEzRwwUjyFXOqB8PNhUzhWWMFXzaX0JrO+QsLqD0/enz 7KNA== X-Gm-Message-State: AHQUAuaaXbQwnUGMkyAjh16cheDchA4vcIjPGoOcJVA5BuZ+IWhHEu6J Bq6NXhBD/7xS1i/6R+WqwacM2F8pTj4nkfIATsFO/g== X-Received: by 2002:a9d:5f06:: with SMTP id f6mr12642451oti.258.1549622551979; Fri, 08 Feb 2019 02:42:31 -0800 (PST) MIME-Version: 1.0 References: <20190207122227.19873-1-m.szyprowski@samsung.com> <20190208064957.zhyue42kpgaoslwm@vireshk-i7> <20190208103133.ysvaroyniuc3k4i5@vireshk-i7> In-Reply-To: <20190208103133.ysvaroyniuc3k4i5@vireshk-i7> From: "Rafael J. Wysocki" Date: Fri, 8 Feb 2019 11:42:20 +0100 Message-ID: Subject: Re: [PATCH 0/2] cpufreq/opp: rework regulator initialization To: Viresh Kumar Cc: "Rafael J. Wysocki" , Marek Szyprowski , Linux Kernel Mailing List , Linux PM , Linux Samsung SoC , "Rafael J . Wysocki" , Nishanth Menon , Stephen Boyd , Bartlomiej Zolnierkiewicz , Dave Gerlach , Wolfram Sang Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 8, 2019 at 11:31 AM Viresh Kumar wrote: > > On 08-02-19, 11:22, Rafael J. Wysocki wrote: > > There are cpufreq driver suspend and resume callbacks, maybe use them? > > > > The driver could do the I2C transactions in its suspend/resume > > callbacks and do nothing in online/offline if those are part of > > system-wide suspend/resume. > > These are per-policy things that we need to do, not sure if driver > suspend/resume is a good place for that. It is more for a case where > CPU 0-3 are in one policy and 4-7 in another. Now 1-7 are > hot-unplugged during system suspend and hotplugged later on. This is > more like complete removal/addition of devices instead of > suspend/resume. No, it isn't. We don't remove devices on offline. We migrate stuff away from them and (opportunistically) power them down. If this is system suspend, the driver kind of knows that offline will take place, so it can prepare for it. Likewise, when online takes place during system-wide resume, it generally is known that this is system-wide resume (there is a flag to indicate that in CPU hotplug), it can be "smart" and avoid accessing suspended devices. Deferring the frequency set up until the driver resume time should do the trick I suppose.