Re: Thoughts on ASOC v2 driver architecture

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

 



Mark Brown wrote:

> But wouldn't it now be legal to represent the machine driver as a device
> in its own right, even if it is connected via GPIOs?

I'm not sure I understand that, so let me say this:

When a driver wants to be probed, it creates a list that describes the kind of
nodes it wants to be probed on.  Typically, the list includes the contents of
the "compatible" property.  The kernel then scans the device tree, and calls the
driver for each matching node.

In the driver's probe function, the driver can either return success or failure.
If it returns success, the driver "owns" the node.  No other driver will ever
get probed for that node again.  This prevents more than one driver from talking
to a particular hardware device.

So if the fabric driver were to list the GPIO node in its probe request, then a
*real* GPIO driver would never get probed (or the other way around).

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux