USB: gadget: f_accessory: New gadget driver for android USB accesories

Change-Id: Ibd8639edc782d22f195f923ca80fe1571feba1e9
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Misc improvements and cleanup:

- Add URI string

- Replace type string with a description string

- Add a control call to retrieve accessory protocol version (currently 1)

- Driver read() and write() calls now fail after USB disconnect until
  driver file is closed and reopened.

- Misc cleanup work

Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Clear accessory strings when USB is disconnected

Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Clear previous strings on ACCESSORY_GET_PROTOCOL

Clearing strings on disconnect does not work since we may receive
a disconnect on some devices when transitioning into accessory mode.
We require an accessory to send ACCESSORY_GET_PROTOCOL before
sending any strings, so any strings from a previous session will be cleared.

Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Clear disconnected flag when driver file is opened

Fixes a race condition that can occur when entering accessory mode.

Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Add string for accessory's unique serial number

Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Set bNumEndpoints to correct value of 2

Signed-off-by: Mike Lockwood <lockwood@android.com>
Add platform data for USB accessory function in pecan board file

Change-Id: I509572d3f17e2081774eeec91dd9864ccb99b12d
Signed-off-by: RonGokhale <cips173@gmail.com>
[P350] Updated defconfig

Change-Id: Ibe642bf976eeb73f0e90e242e614e4fd4b1585bb