linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: rickyniu <rickyniu@google.com>
Cc: balbi@kernel.org, astrachan@google.com, amit.pundir@linaro.org,
	lockwood@android.com, benoit@android.com, jackp@codeaurora.org,
	vvreddy@codeaurora.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, kyletso@google.com
Subject: Re: [PATCH 3/3] ANDROID: usb: f_accessory: send uevent for 51,52 requests
Date: Mon, 12 Oct 2020 13:28:57 +0200	[thread overview]
Message-ID: <20201012112857.GD356911@kroah.com> (raw)
In-Reply-To: <20201012111024.2259162-4-rickyniu@google.com>

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@google.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?

:(


  parent reply	other threads:[~2020-10-12 11:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 11:10 [PATCH 0/3] f_accessory upstream rickyniu
2020-10-12 11:10 ` [PATCH 1/3] ANDROID: usb: gadget: f_accessory: Add Android Accessory function rickyniu
2020-10-12 11:24   ` Greg KH
2020-10-12 11:28   ` Greg KH
2020-10-12 15:58   ` Felipe Balbi
2020-10-12 11:10 ` [PATCH 2/3] ANDROID: USB: f_accessory: Check dev pointer before decoding ctrl request rickyniu
2020-10-12 11:10 ` [PATCH 3/3] ANDROID: usb: f_accessory: send uevent for 51,52 requests rickyniu
2020-10-12 11:23   ` Greg KH
2020-10-12 11:28   ` Greg KH [this message]
2020-10-12 11:29 ` [PATCH 0/3] f_accessory upstream Greg KH
2020-10-12 15:39 ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201012112857.GD356911@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=amit.pundir@linaro.org \
    --cc=astrachan@google.com \
    --cc=balbi@kernel.org \
    --cc=benoit@android.com \
    --cc=jackp@codeaurora.org \
    --cc=kyletso@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lockwood@android.com \
    --cc=rickyniu@google.com \
    --cc=vvreddy@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).