[PATCH v2 2/4] input: apple_z2: Add a driver for Apple Z2 touchscreens

Sasha Finkelstein fnkl.kernel at gmail.com
Wed Dec 4 01:28:48 PST 2024


On Wed, 4 Dec 2024 at 00:07, Dmitry Torokhov <dmitry.torokhov at gmail.com> wrote:
> > +     z2->counter = 1 - z2->counter;
>
> Is this toggling between 1 and 0? Should it be "counter = !counter"? And
> is there better name than counter?

message_index_parity? Kind of a mouthful.

> > +     .remove   = apple_z2_shutdown,
>
> Purring the device into reset state before tearing down interrupt
> handler, etc, may lead to weird errors. Why do you need to do this on
> removal instead of letting devm tear down the device?

The interrupt is masked before putting the device into reset,
and i do need to put it into reset when removing it.



More information about the linux-arm-kernel mailing list