linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] HID: add extra hotkeys in Asus AIO keyboards
@ 2012-01-19  5:47 Keng-Yu Lin
  2012-01-19  7:12 ` [PATCH] HID: add more " Keng-Yu Lin
  2012-02-02  9:32 ` [PATCH] HID: add extra " Jiri Kosina
  0 siblings, 2 replies; 5+ messages in thread
From: Keng-Yu Lin @ 2012-01-19  5:47 UTC (permalink / raw)
  To: Jiri Kosina, linux-input, linux-kernel; +Cc: sylee, Keng-Yu Lin

The Asus All-In-One PC has a wireless keyboard with wifi toggle,
brightness up, brightness down and display off hotkeys.

This patch adds suppoort for these hotkeys.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 drivers/hid/hid-chicony.c |    5 +++++
 drivers/hid/hid-core.c    |    1 +
 drivers/hid/hid-ids.h     |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
index 8965ad9..4162505 100644
--- a/drivers/hid/hid-chicony.c
+++ b/drivers/hid/hid-chicony.c
@@ -45,6 +45,10 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	case 0xff09: ch_map_key_clear(BTN_9);	break;
 	case 0xff0a: ch_map_key_clear(BTN_A);	break;
 	case 0xff0b: ch_map_key_clear(BTN_B);	break;
+	case 0x00f1: ch_map_key_clear(KEY_WLAN);	break;
+	case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN);	break;
+	case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP);	break;
+	case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF);	break;
 	default:
 		return 0;
 	}
@@ -53,6 +57,7 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 
 static const struct hid_device_id ch_devices[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
 	{ }
 };
 MODULE_DEVICE_TABLE(hid, ch_devices);
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index af08ce7..75dbe34 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1396,6 +1396,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
+	{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index b8574cd..fb9e61f 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -190,6 +190,7 @@
 #define USB_DEVICE_ID_CHICONY_TACTICAL_PAD	0x0418
 #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH	0xb19d
 #define USB_DEVICE_ID_CHICONY_WIRELESS	0x0618
+#define USB_DEVICE_ID_CHICONY_WIRELESS2	0x1123
 
 #define USB_VENDOR_ID_CHUNGHWAT		0x2247
 #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH	0x0001
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] HID: add more hotkeys in Asus AIO keyboards
  2012-01-19  5:47 [PATCH] HID: add extra hotkeys in Asus AIO keyboards Keng-Yu Lin
@ 2012-01-19  7:12 ` Keng-Yu Lin
  2012-01-30  6:25   ` [PATCH v2] " Keng-Yu Lin
  2012-02-02  9:32 ` [PATCH] HID: add extra " Jiri Kosina
  1 sibling, 1 reply; 5+ messages in thread
From: Keng-Yu Lin @ 2012-01-19  7:12 UTC (permalink / raw)
  To: Jiri Kosina, linux-input, linux-kernel; +Cc: sylee, Keng-Yu Lin

Add support for the camera key. The hotkey for
Asus S.H.E(Super Hybrid Engine) mode is mapped to KEY_KEY_PROG1
just for notifying the userspace.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 drivers/hid/hid-chicony.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
index 4162505..3b1319e 100644
--- a/drivers/hid/hid-chicony.c
+++ b/drivers/hid/hid-chicony.c
@@ -49,6 +49,8 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN);	break;
 	case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP);	break;
 	case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF);	break;
+	case 0x00f7: ch_map_key_clear(KEY_CAMERA);	break;
+	case 0x00f8: ch_map_key_clear(KEY_KEY_PROG1);	break;
 	default:
 		return 0;
 	}
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v2] HID: add more hotkeys in Asus AIO keyboards
  2012-01-19  7:12 ` [PATCH] HID: add more " Keng-Yu Lin
@ 2012-01-30  6:25   ` Keng-Yu Lin
  2012-02-02  9:32     ` Jiri Kosina
  0 siblings, 1 reply; 5+ messages in thread
From: Keng-Yu Lin @ 2012-01-30  6:25 UTC (permalink / raw)
  To: Jiri Kosina, linux-input, linux-kernel; +Cc: sylee, Keng-Yu Lin

Add support for the camera key. The hotkey for
Asus S.H.E(Super Hybrid Engine) mode is mapped to KEY_KEY_PROG1
just for notifying the userspace.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
---
 drivers/hid/hid-chicony.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

V2: fix typo KEY_KEY_PROG1

diff --git a/drivers/hid/hid-chicony.c b/drivers/hid/hid-chicony.c
index 4162505..b99af34 100644
--- a/drivers/hid/hid-chicony.c
+++ b/drivers/hid/hid-chicony.c
@@ -49,6 +49,8 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 	case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN);	break;
 	case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP);	break;
 	case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF);	break;
+	case 0x00f7: ch_map_key_clear(KEY_CAMERA);	break;
+	case 0x00f8: ch_map_key_clear(KEY_PROG1);	break;
 	default:
 		return 0;
 	}
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] HID: add extra hotkeys in Asus AIO keyboards
  2012-01-19  5:47 [PATCH] HID: add extra hotkeys in Asus AIO keyboards Keng-Yu Lin
  2012-01-19  7:12 ` [PATCH] HID: add more " Keng-Yu Lin
@ 2012-02-02  9:32 ` Jiri Kosina
  1 sibling, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2012-02-02  9:32 UTC (permalink / raw)
  To: Keng-Yu Lin; +Cc: linux-input, linux-kernel, sylee

On Thu, 19 Jan 2012, Keng-Yu Lin wrote:

> The Asus All-In-One PC has a wireless keyboard with wifi toggle,
> brightness up, brightness down and display off hotkeys.
> 
> This patch adds suppoort for these hotkeys.
> 
> Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] HID: add more hotkeys in Asus AIO keyboards
  2012-01-30  6:25   ` [PATCH v2] " Keng-Yu Lin
@ 2012-02-02  9:32     ` Jiri Kosina
  0 siblings, 0 replies; 5+ messages in thread
From: Jiri Kosina @ 2012-02-02  9:32 UTC (permalink / raw)
  To: Keng-Yu Lin; +Cc: linux-input, linux-kernel, sylee

On Mon, 30 Jan 2012, Keng-Yu Lin wrote:

> Add support for the camera key. The hotkey for
> Asus S.H.E(Super Hybrid Engine) mode is mapped to KEY_KEY_PROG1
> just for notifying the userspace.

Applied.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-02-02  9:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-19  5:47 [PATCH] HID: add extra hotkeys in Asus AIO keyboards Keng-Yu Lin
2012-01-19  7:12 ` [PATCH] HID: add more " Keng-Yu Lin
2012-01-30  6:25   ` [PATCH v2] " Keng-Yu Lin
2012-02-02  9:32     ` Jiri Kosina
2012-02-02  9:32 ` [PATCH] HID: add extra " Jiri Kosina

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).