Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754795AbZLCNGY (ORCPT ); Thu, 3 Dec 2009 08:06:24 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754593AbZLCNGX (ORCPT ); Thu, 3 Dec 2009 08:06:23 -0500 Received: from opensource.wolfsonmicro.com ([80.75.67.52]:46630 "EHLO opensource2.wolfsonmicro.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753688AbZLCNGW (ORCPT ); Thu, 3 Dec 2009 08:06:22 -0500 Date: Thu, 3 Dec 2009 13:06:27 +0000 From: Mark Brown To: Daniel Mack Cc: linux-kernel@vger.kernel.org, Liam Girdwood , Pierre Ossman , Andrew Morton , Matt Fleming , Adrian Hunter , David Brownell , Russell King , Linus Walleij , Eric Miao , Robert Jarzmik , Cliff Brake , Jarkko Lavinen , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] mmc: move regulator handling to core Message-ID: <20091203130627.GA31254@rakim.wolfsonmicro.main> References: <1259844390-10541-1-git-send-email-daniel@caiaq.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1259844390-10541-1-git-send-email-daniel@caiaq.de> X-Cookie: Pushing 30 is exercise enough. User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1148 Lines: 26 On Thu, Dec 03, 2009 at 01:46:30PM +0100, Daniel Mack wrote: > At the moment, regulator operations are done from individual mmc host > drivers. This is a problem because the regulators are not claimed > exclusively but the mmc core enables and disables them according to the This is historical, they can all be converted to regulator_get_exclusive() so the move to the core (while good) isn't required for this reason. > case MMC_POWER_OFF: > - if(host->vcc && > - regulator_is_enabled(host->vcc)) > - regulator_disable(host->vcc); > + if(mmc->vcc && mmc->vcc_enabled) { > + regulator_disable(mmc->vcc); > + mmc->vcc_enabled = 0; > + } Can the MMC core actually tolerate the MMC power not getting killed when expected? My understanding from previous discussion was that it wasn't able to do so. If it is then conversion to using regulator_get_exclusive() isn't desirable, of course. -- 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/