Commit Graph

5 Commits

Author SHA1 Message Date
Mike Lockwood
ce4022b8d1 USB: gadget: f_mtp: Add support for sending MTP header during file transfer
MTP_SEND_FILE_WITH_HEADER ioctl allows sending a file with the 12 byte header
prepended at the beginning.
This is to allow MTP to use a single packet for the data phase instead of two.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-15 17:18:14 -04:00
Mike Lockwood
cf7addf29b USB: gadget: f_mtp: Add PTP variant of MTP USB function
This is the same as MTP but with PTP interface descriptor.
Also removed obsolete ioctl for switching between MTP and PTP mode

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-17 22:27:20 -04:00
Mike Lockwood
3e800b6fa0 USB: gadget: f_mtp: Support for file transfer length greater than 4 gigabytes
For backward compatibility with PTP, MTP is limited to a 32-bit file size.
When transferring files greater than 4 gig, MTP uses 0xFFFFFFFF as the file size
and the receiver reads until it receives a short packet.

Expanded size of mtp_file_range.length to 64 bits and added support for
writing zero length packets.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:10 -07:00
Mike Lockwood
1de4d4d8df USB: gadget: f_mtp: Add ioctl for sending events via the interrupt endpoint
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:09 -07:00
Mike Lockwood
ba83b0158e USB: gadget: f_mtp: USB gadget function driver for MTP and PTP device support.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:08 -07:00