linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Ping Cheng <pinglinux@gmail.com>
Cc: linux-input@vger.kernel.org, jikos@kernel.org,
	benjamin.tissoires@gmail.com, Ping Cheng <pingc@wacom.com>,
	Ping Cheng <ping.cheng@wacom.com>
Subject: Re: [PATCH 1/3] HID: wacom: generic: add 3 tablet touch keys
Date: Tue, 28 Feb 2017 10:50:27 -0800	[thread overview]
Message-ID: <20170228185027.GH20776@dtor-ws> (raw)
In-Reply-To: <1487136381-5155-1-git-send-email-pingc@wacom.com>

On Tue, Feb 14, 2017 at 09:26:21PM -0800, Ping Cheng wrote:
> This patch add support to the 3 touch keys on Wacom Cintiq Pro.
> These touch keys are in the middile of the other two keys on
> the top edge of the tablet.
> 
> Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
> ---
>  drivers/hid/wacom_wac.c                | 12 ++++++++++++
>  drivers/hid/wacom_wac.h                |  3 +++
>  include/uapi/linux/input-event-codes.h |  1 +

For the event code:

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

>  3 files changed, 16 insertions(+)
> 
> diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
> index d51daf5..a0135ac 100644
> --- a/drivers/hid/wacom_wac.c
> +++ b/drivers/hid/wacom_wac.c
> @@ -1761,6 +1761,18 @@ static void wacom_wac_pad_usage_mapping(struct hid_device *hdev,
>  		wacom_map_usage(input, usage, field, EV_ABS, ABS_WHEEL, 0);
>  		features->device_type |= WACOM_DEVICETYPE_PAD;
>  		break;
> +	case WACOM_HID_WD_BUTTONCONFIG:
> +		wacom_map_usage(input, usage, field, EV_KEY, KEY_BUTTONCONFIG, 0);
> +		features->device_type |= WACOM_DEVICETYPE_PAD;
> +		break;
> +	case WACOM_HID_WD_ONSCREEN_KEYBOARD:
> +		wacom_map_usage(input, usage, field, EV_KEY, KEY_ONSCREEN_KEYBOARD, 0);
> +		features->device_type |= WACOM_DEVICETYPE_PAD;
> +		break;
> +	case WACOM_HID_WD_CONTROLPANEL:
> +		wacom_map_usage(input, usage, field, EV_KEY, KEY_CONTROLPANEL, 0);
> +		features->device_type |= WACOM_DEVICETYPE_PAD;
> +		break;
>  	}
>  
>  	switch (equivalent_usage & 0xfffffff0) {
> diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h
> index 857ccee..5eba31d 100644
> --- a/drivers/hid/wacom_wac.h
> +++ b/drivers/hid/wacom_wac.h
> @@ -120,6 +120,9 @@
>  #define WACOM_HID_WD_BATTERY_LEVEL      (WACOM_HID_UP_WACOMDIGITIZER | 0x043b)
>  #define WACOM_HID_WD_EXPRESSKEY00       (WACOM_HID_UP_WACOMDIGITIZER | 0x0910)
>  #define WACOM_HID_WD_EXPRESSKEYCAP00    (WACOM_HID_UP_WACOMDIGITIZER | 0x0950)
> +#define WACOM_HID_WD_CONTROLPANEL       (WACOM_HID_UP_WACOMDIGITIZER | 0x0982)
> +#define WACOM_HID_WD_ONSCREEN_KEYBOARD  (WACOM_HID_UP_WACOMDIGITIZER | 0x0983)
> +#define WACOM_HID_WD_BUTTONCONFIG       (WACOM_HID_UP_WACOMDIGITIZER | 0x0986)
>  #define WACOM_HID_WD_BUTTONHOME         (WACOM_HID_UP_WACOMDIGITIZER | 0x0990)
>  #define WACOM_HID_WD_BUTTONUP           (WACOM_HID_UP_WACOMDIGITIZER | 0x0991)
>  #define WACOM_HID_WD_BUTTONDOWN         (WACOM_HID_UP_WACOMDIGITIZER | 0x0992)
> diff --git a/include/uapi/linux/input-event-codes.h b/include/uapi/linux/input-event-codes.h
> index 3af60ee..f5a8d96 100644
> --- a/include/uapi/linux/input-event-codes.h
> +++ b/include/uapi/linux/input-event-codes.h
> @@ -641,6 +641,7 @@
>   * e.g. teletext or data broadcast application (MHEG, MHP, HbbTV, etc.)
>   */
>  #define KEY_DATA			0x277
> +#define KEY_ONSCREEN_KEYBOARD		0x278
>  
>  #define BTN_TRIGGER_HAPPY		0x2c0
>  #define BTN_TRIGGER_HAPPY1		0x2c0
> -- 
> 1.8.3.1
> 

-- 
Dmitry

  parent reply	other threads:[~2017-02-28 18:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15  5:26 [PATCH 1/3] HID: wacom: generic: add 3 tablet touch keys Ping Cheng
2017-02-16  8:07 ` Benjamin Tissoires
2017-02-23 18:25 ` Aaron Armstrong Skomra
2017-02-28 18:50 ` Dmitry Torokhov [this message]
2017-03-06 13:07 ` Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170228185027.GH20776@dtor-ws \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=ping.cheng@wacom.com \
    --cc=pingc@wacom.com \
    --cc=pinglinux@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).