From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751345AbaK1IwN (ORCPT ); Fri, 28 Nov 2014 03:52:13 -0500 Received: from mail-yk0-f179.google.com ([209.85.160.179]:65528 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134AbaK1IwL (ORCPT ); Fri, 28 Nov 2014 03:52:11 -0500 MIME-Version: 1.0 In-Reply-To: References: <1416833572-6880-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-7-git-send-email-amit.daniel@samsung.com> Date: Fri, 28 Nov 2014 14:22:09 +0530 X-Google-Sender-Auth: XYjXrUpkVvCTduPTojmH72PMNIQ Message-ID: Subject: Re: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name From: amit daniel kachhap To: Ulf Hansson Cc: "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc , Kukjin Kim , "linux-kernel@vger.kernel.org" , Sylwester Nawrocki , Pankaj Dubey , Kevin Hilman , "linux-pm@vger.kernel.org" , Geert Uytterhoeven , "Rafael J. Wysocki" , "devicetree@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 27, 2014 at 7:50 PM, Ulf Hansson wrote: > On 25 November 2014 at 09:48, amit daniel kachhap > wrote: >> On Tue, Nov 25, 2014 at 1:05 PM, Ulf Hansson wrote: >>> On 24 November 2014 at 14:04, Amit Daniel Kachhap >>> wrote: >>>> This API may be needed to set the power domain parent/child relationship >>>> in the power domain platform driver. The parent relationship is >>>> generally set after the child power domain is registered with the power >>>> domain subsystem. In this case, pm_genpd_lookup_name API might be >>>> useful. >>> >>> I think this is a step in the wrong direction. Instead we should be >>> working on removing the "name" based APIs from genpd. >>> >>> The proper way should be to pass the PM domain as a parameter to the >>> APIs instead. >> Yes i understand but i had a special requirement for using this API >> during pd probe. >> I cannot use hierarchy to represent parent/child pd nodes as it will >> break the existing SoC's. In my case all the PD nodes are linear. The >> parent/child relationship are established in the second pass after all >> the PD entries are registered with the help of this API. >> Although there a way that i can always keep parent PD's before the >> child PD's in DT in linear order. Will check this approach. > > I had some thinking around this, could the below approach work? > > I just posted a patch[1] adding a new pm_genpd_lookup() API, which is > using a "DT device node" to fetch the genpd. The idea is to use that > API to get the genpd handle which is needed to configure a subdomain > through pm_genpd_add_subdomain() API. I looked at your patch. I seems fine. i will test them and post the new version of my series. Regards, Amit D > > In principle you will have to walk through the DT a couple of times, > initialize those domains (and subdomains) which either don't have a > parent domain or which parent domain already has been initialized. I > guess you need a somewhat clever loop to do that, but I think it's > doable. > > Obviously we also need to have a generic binding for a "parent > domain". I like Geert's proposal from the other patch, which means > using "power-domains = <&pd_xyz>". > > Kind regards > Uffe > > [1] > http://marc.info/?l=linux-pm&m=141709766008458&w=2 > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: amit daniel kachhap Subject: Re: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name Date: Fri, 28 Nov 2014 14:22:09 +0530 Message-ID: References: <1416833572-6880-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-7-git-send-email-amit.daniel@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: In-Reply-To: Sender: linux-samsung-soc-owner@vger.kernel.org To: Ulf Hansson Cc: "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc , Kukjin Kim , "linux-kernel@vger.kernel.org" , Sylwester Nawrocki , Pankaj Dubey , Kevin Hilman , "linux-pm@vger.kernel.org" , Geert Uytterhoeven , "Rafael J. Wysocki" , "devicetree@vger.kernel.org" List-Id: devicetree@vger.kernel.org On Thu, Nov 27, 2014 at 7:50 PM, Ulf Hansson wrote: > On 25 November 2014 at 09:48, amit daniel kachhap > wrote: >> On Tue, Nov 25, 2014 at 1:05 PM, Ulf Hansson wrote: >>> On 24 November 2014 at 14:04, Amit Daniel Kachhap >>> wrote: >>>> This API may be needed to set the power domain parent/child relationship >>>> in the power domain platform driver. The parent relationship is >>>> generally set after the child power domain is registered with the power >>>> domain subsystem. In this case, pm_genpd_lookup_name API might be >>>> useful. >>> >>> I think this is a step in the wrong direction. Instead we should be >>> working on removing the "name" based APIs from genpd. >>> >>> The proper way should be to pass the PM domain as a parameter to the >>> APIs instead. >> Yes i understand but i had a special requirement for using this API >> during pd probe. >> I cannot use hierarchy to represent parent/child pd nodes as it will >> break the existing SoC's. In my case all the PD nodes are linear. The >> parent/child relationship are established in the second pass after all >> the PD entries are registered with the help of this API. >> Although there a way that i can always keep parent PD's before the >> child PD's in DT in linear order. Will check this approach. > > I had some thinking around this, could the below approach work? > > I just posted a patch[1] adding a new pm_genpd_lookup() API, which is > using a "DT device node" to fetch the genpd. The idea is to use that > API to get the genpd handle which is needed to configure a subdomain > through pm_genpd_add_subdomain() API. I looked at your patch. I seems fine. i will test them and post the new version of my series. Regards, Amit D > > In principle you will have to walk through the DT a couple of times, > initialize those domains (and subdomains) which either don't have a > parent domain or which parent domain already has been initialized. I > guess you need a somewhat clever loop to do that, but I think it's > doable. > > Obviously we also need to have a generic binding for a "parent > domain". I like Geert's proposal from the other patch, which means > using "power-domains = <&pd_xyz>". > > Kind regards > Uffe > > [1] > http://marc.info/?l=linux-pm&m=141709766008458&w=2 > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: amit.daniel@samsung.com (amit daniel kachhap) Date: Fri, 28 Nov 2014 14:22:09 +0530 Subject: [PATCH RFC v2 07/12] PM / Domains: export pm_genpd_lookup_name In-Reply-To: References: <1416833572-6880-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-1-git-send-email-amit.daniel@samsung.com> <1416834256-11225-7-git-send-email-amit.daniel@samsung.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Nov 27, 2014 at 7:50 PM, Ulf Hansson wrote: > On 25 November 2014 at 09:48, amit daniel kachhap > wrote: >> On Tue, Nov 25, 2014 at 1:05 PM, Ulf Hansson wrote: >>> On 24 November 2014 at 14:04, Amit Daniel Kachhap >>> wrote: >>>> This API may be needed to set the power domain parent/child relationship >>>> in the power domain platform driver. The parent relationship is >>>> generally set after the child power domain is registered with the power >>>> domain subsystem. In this case, pm_genpd_lookup_name API might be >>>> useful. >>> >>> I think this is a step in the wrong direction. Instead we should be >>> working on removing the "name" based APIs from genpd. >>> >>> The proper way should be to pass the PM domain as a parameter to the >>> APIs instead. >> Yes i understand but i had a special requirement for using this API >> during pd probe. >> I cannot use hierarchy to represent parent/child pd nodes as it will >> break the existing SoC's. In my case all the PD nodes are linear. The >> parent/child relationship are established in the second pass after all >> the PD entries are registered with the help of this API. >> Although there a way that i can always keep parent PD's before the >> child PD's in DT in linear order. Will check this approach. > > I had some thinking around this, could the below approach work? > > I just posted a patch[1] adding a new pm_genpd_lookup() API, which is > using a "DT device node" to fetch the genpd. The idea is to use that > API to get the genpd handle which is needed to configure a subdomain > through pm_genpd_add_subdomain() API. I looked at your patch. I seems fine. i will test them and post the new version of my series. Regards, Amit D > > In principle you will have to walk through the DT a couple of times, > initialize those domains (and subdomains) which either don't have a > parent domain or which parent domain already has been initialized. I > guess you need a somewhat clever loop to do that, but I think it's > doable. > > Obviously we also need to have a generic binding for a "parent > domain". I like Geert's proposal from the other patch, which means > using "power-domains = <&pd_xyz>". > > Kind regards > Uffe > > [1] > http://marc.info/?l=linux-pm&m=141709766008458&w=2 > -- > To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html