From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755444AbaCELre (ORCPT ); Wed, 5 Mar 2014 06:47:34 -0500 Received: from mail-bk0-f51.google.com ([209.85.214.51]:41085 "EHLO mail-bk0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752524AbaCELra (ORCPT ); Wed, 5 Mar 2014 06:47:30 -0500 Message-ID: <53170EC2.6090908@gmail.com> Date: Wed, 05 Mar 2014 12:47:14 +0100 From: Tomasz Figa User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: Ulf Hansson CC: "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-samsung-soc@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , devicetree@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Russell King , Kukjin Kim , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring , Bartlomiej Zolnierkiewicz , Stephen Warren , Tomasz Figa , Mark Brown , Stephen Boyd , Lorenzo Pieralisi , Marek Szyprowski Subject: Re: [PATCH v2 01/11] base: power: Add generic OF-based power domain look-up References: <1393862536-9842-1-git-send-email-tomasz.figa@gmail.com> <1393862536-9842-2-git-send-email-tomasz.figa@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ulf, On 05.03.2014 08:19, Ulf Hansson wrote: >> @@ -2177,3 +2181,297 @@ void pm_genpd_init(struct generic_pm_domain *genpd, >> list_add(&genpd->gpd_list_node, &gpd_list); >> mutex_unlock(&gpd_list_lock); >> } >> + >> +#ifdef CONFIG_PM_GENERIC_DOMAINS_OF > > Do we need a new config for this? Can't we just use CONFIG_OF? > I guess we could, but initially it would have to be CONFIG_OF && !CONFIG_ARCH_EXYNOS until patch 03/11 converts Exynos to use the common code. >> + if (ret < 0) { >> + dev_err(dev, "failed to add to power domain %s: %d", >> + pd->name, ret); >> + return ret; >> + } >> + >> + pm_genpd_dev_need_restore(dev, true); > > So this will reflect the device as being inactive, which I think is > the wrong approach. > > Usually we should expect drivers that's being probed successfully to > leave their devices in active state, right? It depends on domain power state, but actually it seems to be already handled in __pm_genpd_add_device(), so this line might be not needed indeed. Strangely enough, it seemed to be needed on Exynos for correct operation, but maybe in the meantime some fixes in genpd code showed up. This will need some extra testing. Best regards, Tomasz From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Figa Subject: Re: [PATCH v2 01/11] base: power: Add generic OF-based power domain look-up Date: Wed, 05 Mar 2014 12:47:14 +0100 Message-ID: <53170EC2.6090908@gmail.com> References: <1393862536-9842-1-git-send-email-tomasz.figa@gmail.com> <1393862536-9842-2-git-send-email-tomasz.figa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-pm-owner@vger.kernel.org To: Ulf Hansson Cc: "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , linux-samsung-soc@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , devicetree@vger.kernel.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , Pavel Machek , Len Brown , Russell King , Kukjin Kim , Kumar Gala , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring , Bartlomiej Zolnierkiewicz , Stephen Warren , Tomasz Figa , Mark Brown , Stephen Boyd , Loren List-Id: devicetree@vger.kernel.org Hi Ulf, On 05.03.2014 08:19, Ulf Hansson wrote: >> @@ -2177,3 +2181,297 @@ void pm_genpd_init(struct generic_pm_domain *genpd, >> list_add(&genpd->gpd_list_node, &gpd_list); >> mutex_unlock(&gpd_list_lock); >> } >> + >> +#ifdef CONFIG_PM_GENERIC_DOMAINS_OF > > Do we need a new config for this? Can't we just use CONFIG_OF? > I guess we could, but initially it would have to be CONFIG_OF && !CONFIG_ARCH_EXYNOS until patch 03/11 converts Exynos to use the common code. >> + if (ret < 0) { >> + dev_err(dev, "failed to add to power domain %s: %d", >> + pd->name, ret); >> + return ret; >> + } >> + >> + pm_genpd_dev_need_restore(dev, true); > > So this will reflect the device as being inactive, which I think is > the wrong approach. > > Usually we should expect drivers that's being probed successfully to > leave their devices in active state, right? It depends on domain power state, but actually it seems to be already handled in __pm_genpd_add_device(), so this line might be not needed indeed. Strangely enough, it seemed to be needed on Exynos for correct operation, but maybe in the meantime some fixes in genpd code showed up. This will need some extra testing. Best regards, Tomasz From mboxrd@z Thu Jan 1 00:00:00 1970 From: tomasz.figa@gmail.com (Tomasz Figa) Date: Wed, 05 Mar 2014 12:47:14 +0100 Subject: [PATCH v2 01/11] base: power: Add generic OF-based power domain look-up In-Reply-To: References: <1393862536-9842-1-git-send-email-tomasz.figa@gmail.com> <1393862536-9842-2-git-send-email-tomasz.figa@gmail.com> Message-ID: <53170EC2.6090908@gmail.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Ulf, On 05.03.2014 08:19, Ulf Hansson wrote: >> @@ -2177,3 +2181,297 @@ void pm_genpd_init(struct generic_pm_domain *genpd, >> list_add(&genpd->gpd_list_node, &gpd_list); >> mutex_unlock(&gpd_list_lock); >> } >> + >> +#ifdef CONFIG_PM_GENERIC_DOMAINS_OF > > Do we need a new config for this? Can't we just use CONFIG_OF? > I guess we could, but initially it would have to be CONFIG_OF && !CONFIG_ARCH_EXYNOS until patch 03/11 converts Exynos to use the common code. >> + if (ret < 0) { >> + dev_err(dev, "failed to add to power domain %s: %d", >> + pd->name, ret); >> + return ret; >> + } >> + >> + pm_genpd_dev_need_restore(dev, true); > > So this will reflect the device as being inactive, which I think is > the wrong approach. > > Usually we should expect drivers that's being probed successfully to > leave their devices in active state, right? It depends on domain power state, but actually it seems to be already handled in __pm_genpd_add_device(), so this line might be not needed indeed. Strangely enough, it seemed to be needed on Exynos for correct operation, but maybe in the meantime some fixes in genpd code showed up. This will need some extra testing. Best regards, Tomasz