Thread (3 messages) 3 messages, 3 authors, 2008-10-28

Re: GPIO - marking individual pins (not) available in device tree

From: Matt Sealey <hidden>
Date: 2008-10-28 00:47:38
Also in: linux-devicetree

Possibly related (same subject, not in this thread)

Anton Vorontsov wrote:
On Tue, Oct 28, 2008 at 02:12:21AM +0300, Anton Vorontsov wrote:
[...]
quoted
quoted
*   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.
It doesn't. At least not close by.
This is easily doable for QE/CPM gpio controllers (they have option
registers), but nobody cares to check them.
There are plenty of examples where this information is encoded somewhere
else in the chip and Ben Herrenschmidt et al. have recommended that it
be put in the device tree so that drivers do not have to go and check
registers in other units to get that information.

However there is no standard way to expose it. And people just grab a
pin they "know" is free on their particular board.

Are you sure you do NOT see any shortcomings here?

-- 
Matt Sealey [off-list ref]
Genesi, Manager, Developer Relations
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help