[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201012112857.GD356911@kroah.com>
Date: Mon, 12 Oct 2020 13:28:57 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: rickyniu <rickyniu@...gle.com>
Cc: balbi@...nel.org, astrachan@...gle.com, amit.pundir@...aro.org,
lockwood@...roid.com, benoit@...roid.com, jackp@...eaurora.org,
vvreddy@...eaurora.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, kyletso@...gle.com
Subject: Re: [PATCH 3/3] ANDROID: usb: f_accessory: send uevent for 51,52
requests
On Mon, Oct 12, 2020 at 07:10:24PM +0800, rickyniu wrote:
> Add more log between accessory device and host to help debug.
> Send the uevent when the host gets ctrl_request 51 and 52 to user space.
> Let user space know the current connect status.
>
> Signed-off-by: rickyniu <rickyniu@...gle.com>
> ---
> drivers/usb/gadget/function/f_accessory.c | 30 +++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/drivers/usb/gadget/function/f_accessory.c b/drivers/usb/gadget/function/f_accessory.c
> index 5ed80940b9bf..e51cab9246f9 100644
> --- a/drivers/usb/gadget/function/f_accessory.c
> +++ b/drivers/usb/gadget/function/f_accessory.c
> @@ -117,6 +117,12 @@ struct acc_dev {
> /* delayed work for handling ACCESSORY_START */
> struct delayed_work start_work;
>
> + /* work for handling ACCESSORY GET PROTOCOL */
> + struct work_struct getprotocol_work;
> +
> + /* work for handling ACCESSORY SEND STRING */
> + struct work_struct sendstring_work;
> +
> /* worker for registering and unregistering hid devices */
> struct work_struct hid_work;
>
> @@ -849,11 +855,16 @@ int acc_ctrlrequest(struct usb_composite_dev *cdev,
> if (b_requestType == (USB_DIR_OUT | USB_TYPE_VENDOR)) {
> if (b_request == ACCESSORY_START) {
> dev->start_requested = 1;
> + dev_info(&cdev->gadget->dev, "%s: got ACCESSORY_START(53) request\n",
> + __func__);
Why is this here?
:(
Powered by blists - more mailing lists