[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMCVhVMm7p8cB-2SxYg2Q29vDg=b-N=_Cg72uv4qdAzZyQjBMA@mail.gmail.com>
Date: Mon, 18 Aug 2025 17:17:41 -0500
From: Jonathan Denose <jdenose@...gle.com>
To: Randy Dunlap <rdunlap@...radead.org>
Cc: Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires <bentiss@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>, Jonathan Corbet <corbet@....net>,
Henrik Rydberg <rydberg@...math.org>, linux-input@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
Angela Czubak <aczubak@...gle.com>, "Sean O'Brien" <seobrien@...gle.com>
Subject: Re: [PATCH v2 04/11] HID: haptic: introduce hid_haptic_device
On Mon, Aug 18, 2025 at 11:36 AM Randy Dunlap <rdunlap@...radead.org> wrote:
>
> Hi,
>
> On 8/18/25 7:28 AM, Jonathan Denose wrote:
> > From: Angela Czubak <aczubak@...gle.com>
> >
> > Define a new structure that contains simple haptic device configuration
> > as well as current state.
> > Add functions that recognize auto trigger and manual trigger reports
> > as well as save their addresses.
> > Verify that the pressure unit is either grams or newtons.
> > Mark the input device as a haptic touchpad if the unit is correct and
> > the reports are found.
> >
> > Signed-off-by: Angela Czubak <aczubak@...gle.com>
> > Co-developed-by: Jonathan Denose <jdenose@...gle.com>
> > Signed-off-by: Jonathan Denose <jdenose@...gle.com>
> > ---
> > drivers/hid/Kconfig | 11 +++++
> > drivers/hid/Makefile | 1 +
> > drivers/hid/hid-haptic.c | 72 ++++++++++++++++++++++++++++++++
> > drivers/hid/hid-haptic.h | 105 +++++++++++++++++++++++++++++++++++++++++++++++
> > 4 files changed, 189 insertions(+)
> >
> > diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> > index 43859fc757470caf6ad43bd5f72f119e9c36aea7..cbbe82a0a2ba257e45f77ca014fb5f08b71fc62f 100644
> > --- a/drivers/hid/Kconfig
> > +++ b/drivers/hid/Kconfig
> > @@ -92,6 +92,17 @@ config HID_GENERIC
> >
> > If unsure, say Y.
> >
> > +config HID_HAPTIC
> > + bool "Haptic touchpad support"
>
> Why bool instead of tristate?
No particular reason, I can change it to tristate.
>
> > + default n
> > + help
> > + Support for touchpads with force sensors and haptic actuators instead of a
> > + traditional button.
> > + Adds extra parsing and FF device for the hid multitouch driver.
> > + It can be used for Elan 2703 haptic touchpad.
> > +
> > + If unsure, say N.
> > +
>
> I do wish that hid/Kconfig indentation didn't vary so much from coding-style.rst.
>
> > menu "Special HID drivers"
> >
> > config HID_A4TECH
>
>
>
> > diff --git a/drivers/hid/hid-haptic.h b/drivers/hid/hid-haptic.h
> > new file mode 100644
> > index 0000000000000000000000000000000000000000..b729f8245aa60c3d06b79b11846dccf6fcc0c08b
> > --- /dev/null
> > +++ b/drivers/hid/hid-haptic.h
> > @@ -0,0 +1,105 @@
> > +/* SPDX-License-Identifier: GPL-2.0-or-later */
> > +/*
> > + * HID Haptic support for Linux
> > + *
> > + * Copyright (c) 2021 Angela Czubak <acz@...ihalf.com>
> > + */
> > +
> > +/*
> > + */
> eh?
I can clean this up as well.
>
> > +
> > +
> > +#include <linux/hid.h>
> ?
>
> --
> ~Randy
>
I'll also fix the grammatical error you noted on the patch before this
one and resubmit. Thanks for your review!
--
Jonathan
Powered by blists - more mailing lists