Re: [PATCH 1/3] gpiolib: add gpio_set_direction()

From: David Brownell
Date: Sat Feb 27 2010 - 12:51:19 EST


On Saturday 27 February 2010, Mark Brown wrote:
> >>>  "none" ... since it's not even a GPIO, why would it show
> >>>       up through the GPIO subsystem???
> >>
> >> I suspect this is intended to be tristated, which might be useful  
> >> to add.
> >
> > That's what "input" means, as a rule:  no output driver
> > is active with a GPIO configured as "input".  "Tristate"
> > is an option that's relevant for outputs ... low, high,
> > or not-driven.
>
> Indeed, but some devices do implement a distinct tristate state for  
> input mode pins (disabling interrupt generation logic and so on for  
> example).

That's a pretty sloppy usage of the term "tristate" ... yeah, there
are people who take glee in abusing terminology to introduce confusion,
and some of them write technical manuals with little regard to normal
usage of terms (or trademarks, which do exist for "tristate").

IRQ generation logic should be disabled until request_irq() code paths
report otherwise. And regardless, whether a GPIO triggers an IRQ has
nothing at all to do with its "direction".

- Dave

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/