From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anton Vorontsov Subject: Re: GPIO - marking individual pins (not) available in device tree Date: Tue, 28 Oct 2008 02:40:14 +0300 Message-ID: <20081027234014.GA7112@oksana.dev.rtsoft.ru> References: <49014C69.8020408@firmworks.com> <20081024044511.GI4267@yookeroo.seuss> <490248C2.9020104@genesi-usa.com> <20081026234747.GD22339@yookeroo.seuss> <4905E0DC.104@genesi-usa.com> <20081027183421.GA1009@oksana.dev.rtsoft.ru> <49060EC3.1070704@genesi-usa.com> <20081027201023.GA18642@oksana.dev.rtsoft.ru> <49063929.3060900@genesi-usa.com> <20081027231221.GA22008@oksana.dev.rtsoft.ru> Reply-To: avorontsov@ru.mvista.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20081027231221.GA22008@oksana.dev.rtsoft.ru> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org Errors-To: linuxppc-dev-bounces+glppd-linuxppc64-dev=m.gmane.org@ozlabs.org To: Matt Sealey Cc: Mitch Bradley , linuxppc-dev list , devicetree-discuss list List-Id: devicetree@vger.kernel.org On Tue, Oct 28, 2008 at 02:12:21AM +0300, Anton Vorontsov wrote: [...] > > * How do you stop GPIOLIB from blindly approving requests to use > > pins marked X, without making it "controller-specific"? Btw, as for pins marked X... If the gpio controller has some register that specify which pins are not available to use as GPIOs, then just read that register, check its value and return -ENODEV from the .request() gpiolib callback. This is easily doable for QE/CPM gpio controllers (they have option registers), but nobody cares to check them. -- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2