title: What happened to USB MTP gadget driver in mainline Linux kernel?
body: <p>I'm trying to make a embedded device work as a MTP device, using USB gadget driver.</p>
  
  <p>I know have Android switched from mass storage gadget to MTP gadget for quite a while, and found the <a href="https://android.googlesource.com/kernel/tegra/+/android-tegra3-grouper-3.1-jb-mr1-fr/drivers/usb/gadget/f_mtp.c" rel="nofollow">source code for MTP gadget driver</a> in a few Android repositories.</p>
  
  <p>However in the <a href="http://lxr.free-electrons.com/source/drivers/usb/gadget/function/" rel="nofollow">mainline kernel code</a> I didn't find that particular file, nor equivalents.</p>
  
  <p>But I did find <a href="http://comments.gmane.org/gmane.linux.usb.general/28697" rel="nofollow">patches for MTP gadget driver</a> submitted for RFC in 2010.</p>
  
  <p><strong>Question:</strong></p>
  
  <p>Why mainline kernel does not accept this patch, and doesn't provide any other implementation of MTP gadget, either, but Android kernel provides it?</p>
  
  <p>Is this because of technical difficulty or other reasons, like there is a better way to do it?</p>
  
  <p>If I want to enable USB MTP gadget on my devices(one with TI OMAP3730 SoC running 2.6.37 kernel and another with NXP/Freescale IMX6 SoC, running 3.14 kernel), which version of the MTP gadget shall I use for backport?</p>