Re: Clarifications on usb device driver probe() function

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

 



Hi,

(please don't top-post and don't include quotes after you finish your
replies)

On Wed, Jan 30, 2013 at 08:05:08PM +0100, stl wrote:
> > fair enough... now that's a lot clearer. Did you design your own OTG
> > controller or did you license from someone else ?
> 
> Yes, we have designed our own OTG controller.
> 
> I have spent a certain amount of time reading documentation,
> notably "Bootstrap Yourself with Linux-USB stack" which has been for me a
> very good point to start.
> 
> I feel now more comfortable with linux stack:
> - controller driver
> - gadget driver
> - class driver
> and associated structures.
> 
> I have already written a large part of my udc driver.
> The next step I aim to reach is to pass the enumeration successfully, which
> imply that the "probe()" and "usb_gadget_register_driver()"  should be
> fine coded.

which kernel version are you using ? usb_gadget_register_driver() has
been re-factored into generic code long ago.

> But, as I said early, what should I do with platform_get_ressource?
> (we can use IORESOURCE_MEM and IORESOURCE_IRQ as operand)
> I don't understand what these resources correspond to.

IORESOURCE_MEM is used to pass physical address spaces which the driver
can ioremap(). IORESOURCE_IRQ is used to pass IRQ numbers to the driver.

> I have seen in some udc drivers that "resource_get_irq()" is called

there is no such function in the kernel. Do you mean platform_get_irq()?

> before registering IRQ
> with "request_irq()".
> What is the purpose of this function?

to get the proper IRQ number which is passed by platform code using
struct resource.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux