From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Boyd Subject: Re: [PATCH v2 02/11] drivercore: Bind/unbind power domain on probe/remove Date: Tue, 4 Mar 2014 10:29:22 -0800 Message-ID: <20140304182922.GB9985@codeaurora.org> References: <1393862536-9842-1-git-send-email-tomasz.figa@gmail.com> <1393862536-9842-3-git-send-email-tomasz.figa@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1393862536-9842-3-git-send-email-tomasz.figa@gmail.com> Sender: linux-samsung-soc-owner@vger.kernel.org To: Tomasz Figa 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 , Lorenzo Pieralisi , Ulf Hansson , Marek Szyprowski List-Id: devicetree@vger.kernel.org On 03/03, Tomasz Figa wrote: > On a number of platforms, devices are part of controllable power > domains, which need to be enabled before such devices can be accessed > and may be powered down when the device is idle to save some power. > This means that on systems that support power domain control using > generic power domains subsystem, it is necessary to add device to its > power domain before binding a driver to it and remove it from its power > domain after its driver is unbound to make sure that an unused device > does not affect power domain state. > > Since this is not limited to particular busses and specific > archs/platforms, it is more convenient to do the above directly in > driver core, just as done with pinctrl default configuration. This patch > adds necessary code to really_probe() and __device_release_driver() to > achieve this and maintain consistent stack-like ordering of operations > happening when binding and unbinding a driver. > > Signed-off-by: Tomasz Figa Reviewed-by: Stephen Boyd -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation