tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Polymorphic devices
Brad Spencer <brad%anduin.eldar.org@localhost> writes:
> The first is enhancements to ufdti to support the MPSSE engine that some
> of the FTDI chip variants have. This engine allows the chip to be a I2C
> bus, SPI bus and provides some simple GPIO, and a bunch of other stuff,
> as well as the normal USB UART. It is not possible to use all of the
> modes at the same time. That is, these are not separate devices, but
> modes within one device. Or another way, depending on the mode of the
> chip you get different child devices attached to it. I am curious on
> what the thoughts are on how this might be modeled.
My reaction without much thought is to attach them all and to have the
non-selected one return ENXIO or similar. And to have another device on
which you call the ioctl to choose which device to enable.
Or perhaps, to let you open any of them, flipping the mode, and to fail
the 2nd simultaenous open.
Home |
Main Index |
Thread Index |
Old Index