Re: USB MTP driver question

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

 



On Tue, 2011-10-04 at 07:57 -0700, Greg KH wrote:
> On Tue, Oct 04, 2011 at 04:36:06PM +0200, Jack Smith wrote:
> > On Sat, 2011-10-01 at 07:08 -0700, Greg KH wrote:
> > > On Sat, Oct 01, 2011 at 03:00:14PM +0200, jack wrote:
> > > > 
> > > > I am hoping to do some work on the USB MTP (Media Transfer Protocol)
> > > > driver.  Reading linux/drivers/usb/README has left me a bit confused,
> > > > since it seems the location for the MTP driver would not be within the
> > > > USB directory (linux/drivers/usb) or subdirectories, but rather would
> > > > reside somewhere within linux/drivers/media.  However, I don't see
> > > > anything that is identified as a MTP driver for a USB device within that
> > > > directory.  
> > > > 
> > > > Can you help clear up my confusion about this?
> > > 
> > > I'm pretty sure that MTP support for Linux is done as a userspace driver
> > > using gadgetfs.  If you search the archives for the linux-usb mailing
> > > list, you will find a link to where the source code is located, as it
> > > has been posted in the past.
> > > 
> > > Hope this helps,
> > > 
> > > greg k-h
> > 
> > OK, now I feel more confused.  I thought: "The <linux/usb_gadget.h> API
> > makes it easy for peripherals and other devices embedding GNU/Linux
> > system software to act in the USB "device" (slave) role."
> > http://www.linux-usb.org/gadget/    
> 
> Yes.
> 
> > Doesn't that mean that gadget API can be used by USB device
> > manufacturers who want an Open Source solution for the device's USB
> > functionality?  To be more clear, isn't that API used on the device
> > itself, and not for a Linux loadable module to be used by my workstation
> > machine with that device plugged in to the USB port?
> 
> Yes, that's what I thought you were looking for, sorry, I was confused.
> 
No problem.  I'm glad that I was able to understand that much ;-)

> If you want the host side of the MTP solution, that too is done in
> userspace, no kernel driver needed.  I think it's in the gphoto library
> code that uses libusb to talk to the devices.  I'd recommend digging
> around in that.
> 
OK, so, can I ask why this is done in user space, instead of as a kernel
module ?  

Also, why are some USB protocols are handled as drivers, e.g. Mass
Storage, while others are not ?  Pardon me asking, but why the
inconsistency ?


> Hope this helps,
> 
Yes, very helpful, but:

The thing is, I really want to work on device drivers.  It seemed like
USB-MTP would be a good candidate since USB is clearly not going away,
and MTP seems fairly poorly supported within Linux (unless I'm missing
something).

> greg k-h


--
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