usb: gadget: android: Add FunctionFS
authorBenoit Goby <benoit@android.com>
Fri, 30 Mar 2012 02:25:23 +0000 (19:25 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 1 Jul 2013 20:40:49 +0000 (13:40 -0700)
commit823dc6c0d427884c45287210ea8c1c3eb05d4af7
treecc671f614390ee6cb82b9740d5e957faadaa9ec0
parent9405700955e4bb6eac2b80135b1b76d078e3c219
usb: gadget: android: Add FunctionFS

Add support for FunctionFS (ffs) to implement usb functions in userspace.

The aliases property stores the list of functions that are implemented
using functionfs.

For example:
echo "adb,mtp" > /sys/class/android_usb/android0/f_ffs/aliases

Then when the function are enabled:
echo "adb,acm" > /sys/class/android_usb/android0/functions
Internally, ffs and acm will be used.

Change-Id: I44117b183d48a5a99ddbee3ef2cf8998be74598e
Signed-off-by: Benoit Goby <benoit@android.com>
drivers/usb/gadget/android.c