All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Angela Czubak <acz@semihalf.com>
Cc: linux-input@vger.kernel.org, upstream@semihalf.com,
	benjamin.tissoires@redhat.com, jikos@kernel.org
Subject: Re: [PATCH] HID: add HID device reset callback
Date: Wed, 20 Apr 2022 13:51:10 -0700	[thread overview]
Message-ID: <YmByPhFWkzpPrpYe@google.com> (raw)
In-Reply-To: <20220419122632.2988786-1-acz@semihalf.com>

Hi Angela,

On Tue, Apr 19, 2022 at 12:26:32PM +0000, Angela Czubak wrote:
> @@ -529,6 +529,8 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
>  		/* host or device initiated RESET completed */
>  		if (test_and_clear_bit(I2C_HID_RESET_PENDING, &ihid->flags))
>  			wake_up(&ihid->wait);
> +		if (ihid->hid && ihid->hid->driver && ihid->hid->driver->reset)
> +			ihid->hid->driver->reset(ihid->hid);

I wonder if this would not be better to execute the reset callback
first, before signalling that the reset has completed instead of racing
with i2c_hid_hw_reset()?

Thanks.

-- 
Dmitry

  reply	other threads:[~2022-04-20 20:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 12:26 [PATCH] HID: add HID device reset callback Angela Czubak
2022-04-20 20:51 ` Dmitry Torokhov [this message]
2022-04-21 11:23   ` Angela Czubak
2022-05-06  7:08     ` Benjamin Tissoires
2022-05-10 17:23       ` Angela Czubak

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=YmByPhFWkzpPrpYe@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=acz@semihalf.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=upstream@semihalf.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.