Re: [PATCH v2] GPIO: Add gpio_lookup

From: Mark Brown
Date: Wed Oct 14 2009 - 08:54:54 EST


On Tue, Oct 13, 2009 at 03:53:58PM -0700, David Brownell wrote:
> On Tuesday 13 October 2009, Jonathan Corbet wrote:

> > (I'm less worried about the uniqueness side, BTW; it just means drivers
> > need to create meaningful names for their GPIOs.)

> I don't see how they *can* though ... unless they're dynamically
> allocated using a scheme like "combine <this device's sysfs name>
> with <token>". Consider two PCI cards with two different GPIOs
> for their "camera_active" LED... "camera_active" is meaningful,
> but unusable because it's not unique.

I guess the clock API style dev/dev_name based deduping would do the job
here, though that's a separate question from the general usefulness of
this sort of lookup framework.
--
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/