From: Aseda Aboagye <aaboagye@chromium.org>
To: Binbin Zhou <zhoubb.aaron@gmail.com>
Cc: Binbin Zhou <zhoubinbin@loongson.cn>,
Huacai Chen <chenhuacai@loongson.cn>,
Jon Xie <jon_xie@pixart.com>, Jay Lee <jay_lee@pixart.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Huacai Chen <chenhuacai@kernel.org>,
loongson-kernel@lists.loongnix.cn, linux-input@vger.kernel.org,
Xiaotian Wu <wuxiaotian@loongson.cn>
Subject: Re: [PATCH v2] Input: Add driver for PixArt PS/2 touchpad
Date: Fri, 28 Jun 2024 18:52:35 -0500 [thread overview]
Message-ID: <Zn9Mw-vLZeUcCS8b@google.com> (raw)
In-Reply-To: <CAMpQs4LmAc6_-2KHEnZsnaMdbUWVTE_zhDK8W4GEtnBJyr0AUg@mail.gmail.com>
> > On Mon, Jun 24, 2024 at 02:53:59PM +0800, Binbin Zhou wrote:
> > > +
> > > +static void pixart_reset(struct psmouse *psmouse)
> > > +{
> > > + ps2_command(&psmouse->ps2dev, NULL, PSMOUSE_CMD_RESET_DIS);
> > > + msleep(100);
> > > + psmouse_reset(psmouse);
> > > +}
> >
> > What is the reason for the 100ms delay here? Is it to prepare the
> > controller for the upcoming reset? If so, could it perhaps be
> > defined as a macro?
> >
> Yes, the 100ms is required for the upcoming reset.
> And we just use it in this one place, do we really have to define it as a macro?
Got it; could you add a comment stating the requirement?
With regards to the macro, I wouldn't say it's necessary, but they can
make things more readable in general. I'd say for this case, especially
with the comment, it's not needed.
Thanks,
--
Aseda Aboagye
next prev parent reply other threads:[~2024-06-28 23:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 6:53 [PATCH v2] Input: Add driver for PixArt PS/2 touchpad Binbin Zhou
2024-06-25 23:55 ` Aseda Aboagye
2024-06-27 1:24 ` Binbin Zhou
2024-06-28 23:52 ` Aseda Aboagye [this message]
2024-06-29 1:52 ` Binbin Zhou
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=Zn9Mw-vLZeUcCS8b@google.com \
--to=aaboagye@chromium.org \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=dmitry.torokhov@gmail.com \
--cc=jay_lee@pixart.com \
--cc=jon_xie@pixart.com \
--cc=linux-input@vger.kernel.org \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=wuxiaotian@loongson.cn \
--cc=zhoubb.aaron@gmail.com \
--cc=zhoubinbin@loongson.cn \
/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.