From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laxman Dewangan Subject: Re: [PATCH] spi/tegra114: Factor runtime PM out into transfer prepare/unprepare Date: Sat, 27 Jul 2013 17:49:35 +0530 Message-ID: <51F3BAD7.6080303@nvidia.com> References: <1374924187-29715-1-git-send-email-broonie@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1374924187-29715-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Mark Brown Cc: Stephen Warren , "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Mark Brown List-Id: linux-tegra@vger.kernel.org On Saturday 27 July 2013 04:53 PM, Mark Brown wrote: > From: Mark Brown > > Currently the tegra114 driver acquires a runtime PM reference for the > duration of each transfer. This may result in the IP being powered down > between transfers which would be at best wasteful. Instead it is better > to do this in the callbacks that are generated before and after starting > a series of transfers, keeping the IP powered throughout. > > Signed-off-by: Mark Brown > --- Acked-by: Laxman Dewangan The reason I kept this in transfer_one() is because prepare/unprepare was getting called in atomic context. But after the change, Author: Bryan Freed Date: Wed Mar 13 11:17:40 2013 -0700 spi: Unlock a spinlock before calling into the controller driver. It is fine to have prepare as blocking call.