[alsa-devel] Thoughts on ASOC v2 driver architecture

Timur Tabi timur at freescale.com
Mon Jun 16 17:49:27 CEST 2008


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


More information about the Alsa-devel mailing list