Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753011AbbETODd (ORCPT ); Wed, 20 May 2015 10:03:33 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:35937 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752222AbbETODc (ORCPT ); Wed, 20 May 2015 10:03:32 -0400 Date: Wed, 20 May 2015 16:03:25 +0200 From: Sascha Hauer To: Matthias Brugger Cc: Daniel Kurtz , "linux-arm-kernel@lists.infradead.org" , "open list:OPEN FIRMWARE AND..." , Kevin Hilman , "linux-kernel@vger.kernel.org" , linux-mediatek@lists.infradead.org, Sasha Hauer , "Rafael J. Wysocki" , Ulf Hansson Subject: Re: [PATCH 3/5] soc: Mediatek: Add SCPSYS power domain driver Message-ID: <20150520140325.GN6325@pengutronix.de> References: <1431372206-1237-1-git-send-email-s.hauer@pengutronix.de> <1431372206-1237-4-git-send-email-s.hauer@pengutronix.de> <20150519103010.GA6325@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 15:41:36 up 65 days, 1:33, 107 users, load average: 0.11, 0.13, 0.14 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::c0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1708 Lines: 40 On Tue, May 19, 2015 at 01:06:10PM +0200, Matthias Brugger wrote: > 2015-05-19 12:30 GMT+02:00 Sascha Hauer : > > > > I'll check for errors next round. However, I cannot bail out in this > > case since once pm_genpd_init() is called the domain cannot be > > unregistered anymore. > > We should think of implementing this. > I had a quick look on it, and from what I understand as long as you > don't have any subdomains, devices and masters added, it's just > deleting an element from a linked list. In my error path I would have subdomains added though, so I would need that to be handled. > Maybe we should split this in pm_genpd_prepare and pm_genpd_add, with > the last one actually adding the generic_pm_domain to gpd_list. > > This way we could also get rid of the two for loops. Well, with pm_genpd_prepare and pm_genpd_add I would still need two loops, one for preparing and one for adding. I'm not sure how useful it really is to be able to unregister power domains. For now I suggest to continue with the domains that are successfully registered. I'll look into it should the pm domain maintainers request it. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/