From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754173AbcIAVvA (ORCPT ); Thu, 1 Sep 2016 17:51:00 -0400 Received: from mail-ua0-f177.google.com ([209.85.217.177]:32889 "EHLO mail-ua0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754133AbcIAVu6 (ORCPT ); Thu, 1 Sep 2016 17:50:58 -0400 MIME-Version: 1.0 In-Reply-To: References: <20160827134103.28160-1-xzy.xu@rock-chips.com> <20160827134103.28160-3-xzy.xu@rock-chips.com> <2ab8ab94-fa4d-2cd6-5805-a92ac5f9697e@rock-chips.com> <57C3A30B.5080707@rock-chips.com> <77f5cff1-80a2-76b3-40e9-f77caced2257@rock-chips.com> <12451b81-321e-b661-8f1c-25c91bffba54@rock-chips.com> From: Doug Anderson Date: Thu, 1 Sep 2016 14:50:56 -0700 X-Google-Sender-Auth: 9aZl6rSmy8DSdZk9nvw1EzgLYuM Message-ID: Subject: Re: [PATCH 2/2] arm64: dts: rockchip: add eMMC's power domain support for rk3399 To: Ulf Hansson Cc: Shawn Lin , Ziyuan Xu , =?UTF-8?Q?Heiko_St=C3=BCbner?= , Mark Rutland , "devicetree@vger.kernel.org" , Xing Zheng , "open list:ARM/Rockchip SoC..." , Frank Wang , Catalin Marinas , Elaine Zhang , Will Deacon , "linux-kernel@vger.kernel.org" , Brian Norris , Masahiro Yamada , Rob Herring , David Wu , Caesar Wang , Jianqun Xu , "linux-arm-kernel@lists.infradead.org" , Shunqian Zheng Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Sep 1, 2016 at 6:45 AM, Ulf Hansson wrote: > I was reading the discussion regarding this change and browsing the DT > documentation around this... Can you guys explain what really goes on > here, please. > > To me, it seems like you are managing one device's resources in one > separate genpd. One genpd per device. Is that correct? > > Perhaps each device actually has its own PM domain and thus it makes > sense to assign one genpd per device? I'm not as familiar with genpd as I should be, so hopefully this makes sense. ...in hardware there is a "pd_emmc" that is the power domain for just eMMC. That will be referenced hooked up via device tree, like: power-domains = <&power RK3399_PD_EMMC>; I believe that means that power will automatically be removed whenever the device is runtime suspended or suspended. If w're not supporting "autosuspend" and nobody is tweaking anything manually, then it's possible (I think) that runtime suspend happens at exactly the same time as suspend. ...but my point was that it was cleaner to actually do it any restoring in the "runtime resume" hooks to match what genpd does. This matches what you say: use runtime PM. ...but it also sounds like it might not be terribly important to restore these values since they're a bit silly to begin with. If that's true then I guess we don't need to do anything special here. Did that all make sense (it's entirely possible it didn't since somehow my brain still hasn't absorbed all runtime PM and genpd concepts) -Doug