lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACOZ=ZU0zgRmoRu8X5bMUzUrXA9x-qoDJqrQroUs=+qKR58MQA@mail.gmail.com>
Date:   Tue, 7 Feb 2023 10:35:07 +0800
From:   qi feng <fengqi706@...il.com>
To:     jikos@...nel.org
Cc:     benjamin.tissoires@...hat.com, rydberg@...math.org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        fengqi <fengqi@...omi.com>
Subject: Re: [PATCH v2] HID: add KEY_CAMERA_FOCUS event in HID

Hi,

Please help to review this  v2 code

thanks a lot

Qi Feng <fengqi706@...il.com> 于2023年1月31日周二 19:46写道:
>
> From: fengqi <fengqi@...omi.com>
>
> Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
> event is non-existent in current HID driver.we add this event in hid-input.c
> We committed this v2 version following your previous suggestion
>
> Signed-off-by: fengqi <fengqi@...omi.com>
> ---
>  drivers/hid/hid-input.c | 7 +++++++
>  include/linux/hid.h     | 1 +
>  2 files changed, 8 insertions(+)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 9b59e436df0a..05fa3e191574 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1221,6 +1221,13 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
>                         return;
>                 }
>                 goto unknown;
> +       case HID_UP_CAMERA:
> +               switch (usage->hid & HID_USAGE){
> +               case 0x020: map_key_clear(KEY_CAMERA_FOCUS);    break;
> +               case 0x021: map_key_clear(KEY_CAMERA);          break;
> +               default:        goto ignore;
> +               }
> +               break;
>
>         case HID_UP_HPVENDOR:   /* Reported on a Dutch layout HP5308 */
>                 set_bit(EV_REP, input->evbit);
> diff --git a/include/linux/hid.h b/include/linux/hid.h
> index 8677ae38599e..e3daf2c7739c 100644
> --- a/include/linux/hid.h
> +++ b/include/linux/hid.h
> @@ -155,6 +155,7 @@ struct hid_item {
>  #define HID_UP_DIGITIZER       0x000d0000
>  #define HID_UP_PID             0x000f0000
>  #define HID_UP_BATTERY         0x00850000
> +#define HID_UP_CAMERA          0x00900000
>  #define HID_UP_HPVENDOR         0xff7f0000
>  #define HID_UP_HPVENDOR2        0xff010000
>  #define HID_UP_MSVENDOR                0xff000000
> --
> 2.39.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ