On Sat, Sep 11, 2010 at 11:31 PM, Josh Cartwright <[email protected]> wrote:
>
> To 'bind' to a device means that your driver is asserting control of the
> device.
You mean to say the driver is trying to take control of the device.
>
> On the previous slide, a USB device ID table was created that lists the
> IDs of the devices the driver supports.
Do you mean to say that it is possible that same driver support multiple
devices?
I have no clue of it.
> When your driver registers to
> the USB core (via usb_register()),
Can you point me which slide in the presentation I gave link is meaning this
type of thing.
> the core code looks at the list of
> unclaimed devices and your provided ID table and calls your probe() for
> any matches.
>
> Your probe() callback is responsible for returning 0 if it wants to
> 'bind' to the device, otherwise you return an error.
>
> Is 0 for success.
I see a structure
static struct usb_driver {
.owner :
.name :
.probe :
.disconnect :
.id_connect :
}
I am not clear as how this structure has mapped to functions.
What my understanding of writing a device driver till now from my search on
Internet is
reserve a set of major and minor number
define a file_operations structure associating to function pointers
we need to define operations corresponding to system calls an application
can apply
if I were to take above three points then on the link
http://www.kroah.com/linux/talks/ols_2005_driver_tutorial/index.html
which slide is doing that?