From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 28 Oct 2008 02:40:14 +0300 From: Anton Vorontsov To: Matt Sealey Subject: Re: GPIO - marking individual pins (not) available in device tree 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> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 In-Reply-To: <20081027231221.GA22008@oksana.dev.rtsoft.ru> Cc: Mitch Bradley , linuxppc-dev list , devicetree-discuss list Reply-To: avorontsov@ru.mvista.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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