From patchwork Fri Feb 1 15:18:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 10792923 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3A7936C2 for ; Fri, 1 Feb 2019 15:18:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29CDF312D6 for ; Fri, 1 Feb 2019 15:18:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1BD8A316DA; Fri, 1 Feb 2019 15:18:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B955D312D6 for ; Fri, 1 Feb 2019 15:18:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730250AbfBAPSR (ORCPT ); Fri, 1 Feb 2019 10:18:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58062 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730113AbfBAPSQ (ORCPT ); Fri, 1 Feb 2019 10:18:16 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9EB89C0578F8; Fri, 1 Feb 2019 15:18:16 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6F1DC620D0; Fri, 1 Feb 2019 15:18:11 +0000 (UTC) From: Hans de Goede To: Jiri Kosina , Benjamin Tissoires Cc: Hans de Goede , linux-input@vger.kernel.org Subject: [PATCH] HID: Add support for Toshiba WT10A tablet bluetooth keyboard Date: Fri, 1 Feb 2019 16:18:07 +0100 Message-Id: <20190201151807.3454-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 01 Feb 2019 15:18:16 +0000 (UTC) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The bluetooth-keyboard which comes with the Toshiba WT10A tablet uses a couple of usage codes in the vendor specific ffbc page. The keyboard has a vendor-id of 04f2 which maps to Chicony. Other then adding a few keymappings for the ffbc usages, no special handling is necessary. So rather then adding a new hid-toshiba driver, this commit adds the ID and 2 extra key-mappings to the hid-topseed driver. The hid-topseed driver already contains mapping for some ffbc usages (and does nothing else) and it already binds to another Chicony manufactured keyboard. Signed-off-by: Hans de Goede --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-topseed.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 24f846d67478..644a9f2bf624 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -273,6 +273,7 @@ #define USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE 0x1053 #define USB_DEVICE_ID_CHICONY_WIRELESS2 0x1123 #define USB_DEVICE_ID_ASUS_AK1D 0x1125 +#define USB_DEVICE_ID_CHICONY_TOSHIBA_WT10A 0x1408 #define USB_DEVICE_ID_CHICONY_ACER_SWITCH12 0x1421 #define USB_VENDOR_ID_CHUNGHWAT 0x2247 diff --git a/drivers/hid/hid-topseed.c b/drivers/hid/hid-topseed.c index 8a5b843e9dd6..e9cdde840362 100644 --- a/drivers/hid/hid-topseed.c +++ b/drivers/hid/hid-topseed.c @@ -34,7 +34,9 @@ static int ts_input_mapping(struct hid_device *hdev, struct hid_input *hi, return 0; switch (usage->hid & HID_USAGE) { + case 0x00c: ts_map_key_clear(KEY_WLAN); break; case 0x00d: ts_map_key_clear(KEY_MEDIA); break; + case 0x010: ts_map_key_clear(KEY_ZOOM); break; case 0x024: ts_map_key_clear(KEY_MENU); break; case 0x025: ts_map_key_clear(KEY_TV); break; case 0x027: ts_map_key_clear(KEY_MODE); break; @@ -67,6 +69,7 @@ static const struct hid_device_id ts_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) }, { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) }, + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TOSHIBA_WT10A) }, { } }; MODULE_DEVICE_TABLE(hid, ts_devices);