Re: [PATCH v2 04/11] HID: haptic: introduce hid_haptic_device

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

 



Hi,

On 8/18/25 7:28 AM, Jonathan Denose wrote:
> From: Angela Czubak <aczubak@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> Co-developed-by: Jonathan Denose <jdenose@xxxxxxxxxx>
> Signed-off-by: Jonathan Denose <jdenose@xxxxxxxxxx>
> ---
>  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?

> +	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@xxxxxxxxxxxx>
> + */
> +
> +/*
> + */
eh?

> +
> +
> +#include <linux/hid.h>
?

-- 
~Randy





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux