* [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
@ 2023-01-09 12:32 Qi Feng
2023-01-10 9:53 ` qi feng
2023-01-20 17:51 ` Jiri Kosina
0 siblings, 2 replies; 7+ messages in thread
From: Qi Feng @ 2023-01-09 12:32 UTC (permalink / raw)
To: jikos; +Cc: linux-input, linux-kernel, fengqi
From: fengqi <fengqi@xiaomi.com>
Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
event is non-existent in current HID driver.
So we add this event in hid-input.c
Signed-off-by: fengqi <fengqi@xiaomi.com>
---
drivers/hid/hid-input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 9b59e436df0a..22cca3406b5c 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1105,6 +1105,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
+ case 0x0ee: map_key_clear(KEY_CAMERA_FOCUS); break;
case 0x0f5: map_key_clear(KEY_SLOW); break;
case 0x181: map_key_clear(KEY_BUTTONCONFIG); break;
--
2.39.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
2023-01-09 12:32 [PATCH] HID: add KEY_CAMERA_FOCUS event in HID Qi Feng
@ 2023-01-10 9:53 ` qi feng
2023-01-12 2:46 ` qi feng
2023-01-20 17:51 ` Jiri Kosina
1 sibling, 1 reply; 7+ messages in thread
From: qi feng @ 2023-01-10 9:53 UTC (permalink / raw)
To: jikos; +Cc: linux-input, linux-kernel, fengqi, benjamin.tissoires, rydberg
loop more
Qi Feng <fengqi706@gmail.com> 于2023年1月9日周一 20:32写道:
>
> From: fengqi <fengqi@xiaomi.com>
>
> Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
> event is non-existent in current HID driver.
> So we add this event in hid-input.c
>
> Signed-off-by: fengqi <fengqi@xiaomi.com>
> ---
> drivers/hid/hid-input.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 9b59e436df0a..22cca3406b5c 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1105,6 +1105,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
> case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
> case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
> + case 0x0ee: map_key_clear(KEY_CAMERA_FOCUS); break;
> case 0x0f5: map_key_clear(KEY_SLOW); break;
>
> case 0x181: map_key_clear(KEY_BUTTONCONFIG); break;
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
2023-01-10 9:53 ` qi feng
@ 2023-01-12 2:46 ` qi feng
0 siblings, 0 replies; 7+ messages in thread
From: qi feng @ 2023-01-12 2:46 UTC (permalink / raw)
To: jikos
Cc: rydberg, benjamin.tissoires, linux-input, linux-kernel, fengqi,
lixiaojie5
please help me review this code
thanks a lot
qi feng <fengqi706@gmail.com> 于2023年1月10日周二 17:53写道:
>
> loop more
>
>
> Qi Feng <fengqi706@gmail.com> 于2023年1月9日周一 20:32写道:
> >
> > From: fengqi <fengqi@xiaomi.com>
> >
> > Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
> > event is non-existent in current HID driver.
> > So we add this event in hid-input.c
> >
> > Signed-off-by: fengqi <fengqi@xiaomi.com>
> > ---
> > drivers/hid/hid-input.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> > index 9b59e436df0a..22cca3406b5c 100644
> > --- a/drivers/hid/hid-input.c
> > +++ b/drivers/hid/hid-input.c
> > @@ -1105,6 +1105,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> > case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
> > case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
> > case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
> > + case 0x0ee: map_key_clear(KEY_CAMERA_FOCUS); break;
> > case 0x0f5: map_key_clear(KEY_SLOW); break;
> >
> > case 0x181: map_key_clear(KEY_BUTTONCONFIG); break;
> > --
> > 2.39.0
> >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
2023-01-09 12:32 [PATCH] HID: add KEY_CAMERA_FOCUS event in HID Qi Feng
2023-01-10 9:53 ` qi feng
@ 2023-01-20 17:51 ` Jiri Kosina
2023-01-29 2:59 ` qi feng
1 sibling, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2023-01-20 17:51 UTC (permalink / raw)
To: Qi Feng; +Cc: linux-input, linux-kernel, fengqi, Benjamin Tissoires
On Mon, 9 Jan 2023, Qi Feng wrote:
> From: fengqi <fengqi@xiaomi.com>
>
> Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
> event is non-existent in current HID driver. So we add this event in
> hid-input.c
>
> Signed-off-by: fengqi <fengqi@xiaomi.com>
> ---
> drivers/hid/hid-input.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 9b59e436df0a..22cca3406b5c 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -1105,6 +1105,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
> case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
> case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
> + case 0x0ee: map_key_clear(KEY_CAMERA_FOCUS); break;
> case 0x0f5: map_key_clear(KEY_SLOW); break;
>
> case 0x181: map_key_clear(KEY_BUTTONCONFIG); break;
[ CCing Benjamin ]
Hi,
so according to HUT 1.3.0, 0xeb-0xef are Reserved for now, so I'd be a
little bit hesitatnt to but this into the generic mapping, as later HUT
revision might define this in a different way.
Which devices are known to be producing this?
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
2023-01-20 17:51 ` Jiri Kosina
@ 2023-01-29 2:59 ` qi feng
2023-01-30 14:28 ` Jiri Kosina
0 siblings, 1 reply; 7+ messages in thread
From: qi feng @ 2023-01-29 2:59 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel, fengqi, Benjamin Tissoires
Hi,
Our Bluetooth Handle needs the focus function, which is missing in the
current map
If our setting is unreasonable, do you have other suggested values
thanks
Jiri Kosina <jikos@kernel.org> 于2023年1月21日周六 01:51写道:
>
> On Mon, 9 Jan 2023, Qi Feng wrote:
>
> > From: fengqi <fengqi@xiaomi.com>
> >
> > Our HID device need KEY_CAMERA_FOCUS event to control camera, but this
> > event is non-existent in current HID driver. So we add this event in
> > hid-input.c
> >
> > Signed-off-by: fengqi <fengqi@xiaomi.com>
> > ---
> > drivers/hid/hid-input.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> > index 9b59e436df0a..22cca3406b5c 100644
> > --- a/drivers/hid/hid-input.c
> > +++ b/drivers/hid/hid-input.c
> > @@ -1105,6 +1105,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
> > case 0x0e5: map_key_clear(KEY_BASSBOOST); break;
> > case 0x0e9: map_key_clear(KEY_VOLUMEUP); break;
> > case 0x0ea: map_key_clear(KEY_VOLUMEDOWN); break;
> > + case 0x0ee: map_key_clear(KEY_CAMERA_FOCUS); break;
> > case 0x0f5: map_key_clear(KEY_SLOW); break;
> >
> > case 0x181: map_key_clear(KEY_BUTTONCONFIG); break;
>
> [ CCing Benjamin ]
>
> Hi,
>
> so according to HUT 1.3.0, 0xeb-0xef are Reserved for now, so I'd be a
> little bit hesitatnt to but this into the generic mapping, as later HUT
> revision might define this in a different way.
>
> Which devices are known to be producing this?
>
> --
> Jiri Kosina
> SUSE Labs
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
2023-01-29 2:59 ` qi feng
@ 2023-01-30 14:28 ` Jiri Kosina
2023-02-02 9:56 ` qi feng
0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2023-01-30 14:28 UTC (permalink / raw)
To: qi feng; +Cc: linux-input, linux-kernel, fengqi, Benjamin Tissoires
On Sun, 29 Jan 2023, qi feng wrote:
> Hi,
> Our Bluetooth Handle needs the focus function, which is missing in the
> current map
> If our setting is unreasonable, do you have other suggested values
If the device is under your control, wouldn't it be better to let it
produce something more defined by HID standard? (see e.g. 0x90 -- Camera
Control Page).
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] HID: add KEY_CAMERA_FOCUS event in HID
2023-01-30 14:28 ` Jiri Kosina
@ 2023-02-02 9:56 ` qi feng
0 siblings, 0 replies; 7+ messages in thread
From: qi feng @ 2023-02-02 9:56 UTC (permalink / raw)
To: Jiri Kosina; +Cc: linux-input, linux-kernel, fengqi, Benjamin Tissoires
I resubmitted V2 according to the standard, please help me to review it
thanks a lot
Jiri Kosina <jikos@kernel.org> 于2023年1月30日周一 22:28写道:
>
> On Sun, 29 Jan 2023, qi feng wrote:
>
> > Hi,
> > Our Bluetooth Handle needs the focus function, which is missing in the
> > current map
> > If our setting is unreasonable, do you have other suggested values
>
> If the device is under your control, wouldn't it be better to let it
> produce something more defined by HID standard? (see e.g. 0x90 -- Camera
> Control Page).
>
> Thanks,
>
> --
> Jiri Kosina
> SUSE Labs
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-02-02 9:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-09 12:32 [PATCH] HID: add KEY_CAMERA_FOCUS event in HID Qi Feng
2023-01-10 9:53 ` qi feng
2023-01-12 2:46 ` qi feng
2023-01-20 17:51 ` Jiri Kosina
2023-01-29 2:59 ` qi feng
2023-01-30 14:28 ` Jiri Kosina
2023-02-02 9:56 ` qi feng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).