RE: Linux USB file storage gadget with new UDC

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

 



Hi,

> > > > > > # ls /dev/mmc*
> > > > > > /dev/mmc0       /dev/mmc2       /dev/mmcblk0p1
> > > > > > /dev/mmc1       /dev/mmcblk0    /dev/mmcblk0p2
> > > > > >
> > > > > > # mount /dev/mmcblk0 /mnt
> > > > > > # ls /mnt/
> > > > > > initramfs.gz
> > > > > > # umount /mnt
> > > > > > umounting 1
> > > > > > umounting 0
> > > > > > # insmod kagen2_udc.ko
> > > > > > # insmod g_file_storage.ko file=/dev/mmcblk0
> > > > > > insmod: can't insert 'g_file_storage.ko': No such device
> > > > >
> > > > > are you registering your udc with the udc class ?? Are you
> > > > > initilizing
> > > > > udc->gadget.dev ? Look at other udc drivers to check if you're
> > > > > udc->missing
> > > > > something. For example look at
> > > > > drivers/usb/dwc3/gadget.c::dwc3_gadget_init() to see how I
> > > > > register the gadget device and how I add the gadget to the list of
UDCs.
> > > > >
> > > > > Also look at drivers/usb/dwc3/gadget.c::dwc3_gadget_start() to
> > > > > see how
> > > > that
> > > > > should be implemented.
> > > > > --
> > > > > balbi
> > > >
> > > > I look at drivers/usb/dwc3/gadget.c and compare to my UDC code.
> > > > The difference is my UDC probe function is declared in platform
> > > > driver, and the platform probe function is not called. How could
> > > > the file storage gadget know it needs to call my UDC code? Is it
> > > > done by the platform_add_devices(struct platform_device **pdevs,
> > > > int ndev) which is to add UDC driver to the linux system?
> > > >
> > > > Here is my probe function. Somehow, It is not called after insmod.
> > >
> > > if it's not called it's because you don't have a matching
platform_device.
> > >
> > > For a driver's probe() to be called you need a platform_device with
> > > the
> > same
> > > name.
> > > --
> > > balbi
> >
> > Thanks. The driver's probe() can be called. Now when insmod
> > g_file_storage.ko, it says the file-backed storage gadget failed to
> > start. I have defined the udc_start() function in usb_gadget_ops
> > structure and added the udc_start() function. What else do I need to
add?
> >
> > Here is the message at console:
> >
> > # insmod kagen2_udc.ko
> > # insmod g_file_storage.ko file=/dev/mmcblk0
> >  gadget: controller 'kagen2_usb' not recognized
> 
> this should have caught your attention!! Also, rebase to a newer kernel as
that
> message has already been dropped.
> 

The udc_start() function is being called now. Before this, it was not called
because of driver->max_speed checking in udc_start(). After udc_start(),
which function is to be called when the gadget device is connected to the
host PC?

Thanks. I will look at the "controller 'kagen2_usb' not recognized" message.
The development is being done on arm9 architecture. I am afraid it is not
possible to move to a newer kernel now.

Thanks,
victor


================================================================================================
CONFIDENTIALITY NOTE:
This e-mail and any attachments may contain confidential information and may be protected by legal privilege. If you are not the intended addressee (or authorized to receive for the addressee). be aware that any disclosure, copying, distribution or use of this e-mail or any attachment is prohibited. If you have received this e-mail in error, please notify us immediately by returning it to the sender and delete this copy from your system. Thank you for your cooperation.
KeyASIC Inc.
================================================================================================
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux