All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] (G)PIO access trends, architecture independant solutions?
@ 2010-08-11 22:02 Reinhard Meyer
  2010-08-11 22:23 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Reinhard Meyer @ 2010-08-11 22:02 UTC (permalink / raw)
  To: u-boot

Hello all,

recently a patch for soft-i2c has been accepted that uses gpio_* functions.
Supposedly they are generic, but grep-ing shows that such functions
only exist in the nios2 architecture.

Every architecture seems to have their own similiar but not identical way
for gpio access. At91 even has two ways where the IMHO better way is
depreciated...

The better way IMHO is when Port and Bit are together in one parameter.

I also like the possibility of some solutions to 'request' a pin.

So, before potentially reworking the at91 solution(s), I'd like to have some
input/insight if there is a tendency towards a generalization across all
architectures?

Ideally, that could start with introducing a "gpio.h" header file outside an
architecture specific path.

Naturally, the multitude of designs of GPIO ports might make it difficult to
unify the access functions...

Reinhard

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] (G)PIO access trends, architecture independant  solutions?
  2010-08-11 22:02 [U-Boot] (G)PIO access trends, architecture independant solutions? Reinhard Meyer
@ 2010-08-11 22:23 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2010-08-11 22:23 UTC (permalink / raw)
  To: u-boot

On Wed, Aug 11, 2010 at 6:02 PM, Reinhard Meyer wrote:
> recently a patch for soft-i2c has been accepted that uses gpio_* functions.
> Supposedly they are generic, but grep-ing shows that such functions
> only exist in the nios2 architecture.

grep harder ... other ports implement the common gpio layer

> So, before potentially reworking the at91 solution(s), I'd like to have some
> input/insight if there is a tendency towards a generalization across all
> architectures?

the Linux GPIO API is the adopted one.  use that.
-mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-11 22:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-11 22:02 [U-Boot] (G)PIO access trends, architecture independant solutions? Reinhard Meyer
2010-08-11 22:23 ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.