lkml.org 
[lkml]   [2015]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] usb: gadget: Fix gadget deactivaton feature
Date
Hi,

This patch set introduces two functions usb_gadget_deactivate() and
usb_gadget_activate(), designed to prevent udc-core from showing binded
gadget to host until it will be ready to work. It also makes
usb_function_deactivate()/activate() using these functions.

So far gadget deactivation was made by calling usb_gadget_disconnect(),
but since we have usb_gadget_connect() called after gadget->bind()
(in udc_bind_to_driver()) this method doesn't provide expected result.
Calling function usb_gadget_disconnect() before gadget connection doesn't
prevent udc-core from connecting gadget to driver - usb_gadget_disconnect()
call is ignored and gadget is connected regardless to it. This usually
results with errors, for example because we binded gadget with 0
configurations.

This patch set fixes this problem adding functions allowing to perform
effective gadget deactivation from gadget->bind().

Best regards,
Robert Baldyga

Robert Baldyga (2):
usb: gadget: add usb_gadget_activate/deactivate functions
usb: composite: fix usb_function_activate/deactivate functions

drivers/usb/gadget/composite.c | 4 +-
include/linux/usb/gadget.h | 100 ++++++++++++++++++++++++++++++++++++++---
2 files changed, 96 insertions(+), 8 deletions(-)

--
1.9.1



\
 
 \ /
  Last update: 2015-04-07 11:01    [W:0.184 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site