Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756218AbZLDMpE (ORCPT ); Fri, 4 Dec 2009 07:45:04 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756024AbZLDMpD (ORCPT ); Fri, 4 Dec 2009 07:45:03 -0500 Received: from cassiel.sirena.org.uk ([80.68.93.111]:50545 "EHLO cassiel.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755724AbZLDMpC (ORCPT ); Fri, 4 Dec 2009 07:45:02 -0500 Date: Fri, 4 Dec 2009 12:45:05 +0000 From: Mark Brown To: Antonio Ospite Cc: Richard Purdie , Liam Girdwood , Daniel Ribeiro , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, openezx-devel@lists.openezx.org Subject: Re: [PATCH] leds: Add LED class driver for regulator driven LEDs. Message-ID: <20091204124505.GA3320@sirena.org.uk> References: <1259775625-25973-1-git-send-email-ospite@studenti.unina.it> <20091202180658.GA12292@rakim.wolfsonmicro.main> <20091204133943.ddf0e53d.ospite@studenti.unina.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091204133943.ddf0e53d.ospite@studenti.unina.it> X-Cookie: Happy feast of the pig! User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: broonie@sirena.org.uk X-SA-Exim-Scanned: No (on cassiel.sirena.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1121 Lines: 22 On Fri, Dec 04, 2009 at 01:39:43PM +0100, Antonio Ospite wrote: > Mark Brown wrote: > > You almost certainly want regulator_get_exclusive() here; this driver > > can't function properly if something else is using the regulator and > > holding the LED on or off without it. You'll also want to check the > > status of the LED on startup and update your internal status to match > > that. > When you refer to "the status of the LED on startup" do you mean a > initial brightness value passed via leds-regulator platform data, or the > initial status or the regulator itself? The hardware state at startup; I would imagine that you'd want to make setting the initial state via platform data optional in order to enable a smooth handover from bootloader to Linux where the state may depend on the runtime state (eg, charging indication). -- 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/