Re: RFC: Platform data for onboard USB assets

From: Greg KH
Date: Fri Mar 11 2011 - 12:09:18 EST


On Fri, Mar 11, 2011 at 04:51:53PM +0000, Andy Green wrote:
> On 03/11/2011 04:45 PM, Somebody in the thread at some point said:
>
> Hi -
>
> >Or to put it another way... With external, hot-plugged USB devices,
> >there is no need to know "how it is wired". The fact that it is on a
> >USB bus is the only information necessary. Why does anyone need to
> >know more than this for on-board USB devices?
>
> For example, the USB device is a chip with option pins. On the
> board it is placed on, some of the option pins are tied in a
> particular way that impacts its actual function, but can't be seen
> from the chip itself. The driver covers all the options, but it
> needs to be told which mode the chip was wired up for.

Then that information is in the driver that was written for that
specific device, it is NOT a class device if it requires this type of
information to work properly.

> Another example, it's a USB chip with GPIO pins, analogous to a I2C
> GPIO extender. Some of the GPIO are wired to LEDs also on the
> board, which you want to expose as generic GPIO. The board
> definition file is in a position to do all that because it knows
> what the board is and what it is wired up to.
>
> That the USB chips in these examples are 'discoverable' has nothing
> to do with anything. In fact the board definition file has
> knowledge about the "functional implemntation" of the instances of
> those chips -- just exactly those instances soldered to the board.
> If you plugged another of these chips, the board definition file has
> nothing to say about it because they are not "on the board" and
> in-scope for it.

Then put that information in the specific driver for this type of
device.

Also, do you have a real example of a USB driver today that needs this?

thanks,

greg k-h
--
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/