lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Nov 2006 12:53:00 -0800
From:	David Brownell <david-b@...bell.net>
To:	Bill Gatliff <bgat@...lgatliff.com>
Cc:	Paul Mundt <lethal@...ux-sh.org>,
	Linux Kernel list <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...l.org>,
	Andrew Victor <andrew@...people.com>,
	Haavard Skinnemoen <hskinnemoen@...el.com>, jamey.hicks@...com,
	Kevin Hilman <khilman@...sta.com>,
	Nicolas Pitre <nico@....org>,
	Russell King <rmk@....linux.org.uk>,
	Tony Lindgren <tony@...mide.com>
Subject: Re: [patch/rfc 2.6.19-rc5] arch-neutral GPIO calls

On Monday 13 November 2006 12:26 pm, Bill Gatliff wrote:

> >Nah; look at arch/arm/plat-omap/gpio.c and ignore the mess, but observe
> >that what you see there is essentially a bunch of "gpio controller"
> >classes using the ugly "switch(type)" dispatch scheme instead of the
> >prettier "type->op()" dispatch scheme.  All that stuff needs to be
> >cleaner, but for now it'd suffice to add a new FPGA typecode.
> 
> Agreed.  But if we add to the machine descriptor, then not only do you 
> not need to touch arch-omap/gpio.c, but you can take that switch 
> statement out, too.  Just one less chunk of code to tweak when a new 
> platform is supported.

Do non-ARM platforms have board/machine descriptors on Linux, though?
I thought most didn't ...

One could come up with an implementation that uses GPIO numbers
as indices into a descriptor array, and using board-specific
initialization of that array ... just like with IRQs and irq_chip.

That could lead to heavier weight implementations than I'd prefer
to see (since GPIOs are a very light weight notion!), but it'd
certainly provide a more reusable way to add GPIO controllers.

All behind the API I proposed, note -- no changes needed.

- Dave


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ