Re: [PATCH] gpio: omap: make gpio numbering deterministical by using of aliases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, Jun 22, 2016 at 6:16 PM, Mark Rutland <mark.rutland@xxxxxxx> wrote:

> In general, our use of aliases is rather ill-defined. It would be nicer
> if we could address devices in a similar manner to disks or partitions,
> e.g. by path or uuid, but I don't think we have anything sensible we can
> use there.
>
> Given that, I can see the use of an alias to provide a consistent way of
> referring to a particular gpiochip (and maybe we need to expose the
> alises information somehow to userspace), but IMO that's independent of
> any global ID space, probe ordering, etc.

>From the kernel point of view the way forward to identify and refer to
a particular gpiochip is using /dev/gpiochipN the character device.

If complete topology of the bus placement etc is needed, userspace
can traverse /sys/bus/gpio/*

This solves the big problem with the current global numbering system
in /sys/class/gpio/*

So what this alias should address would be two things:

- Solve the immediate issue of the global number space for the
  legacy sysfs ABI, but also:

- Determine which chip is gpiochip0, gpiochip1, .. etc in the
  new ABI, so the devices get consistent numbering.

The latter is lightly frowned upon by the udev people: they think it
is more proper to traverse /sys to get topological information about
the devices.

I would appreciate if a patch to add alias handling would take care
of both these things if we apply it.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux