Re: [PATCH v2] Input: Add driver for PixArt PS/2 touchpad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 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




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux