From patchwork Wed Mar 23 17:33:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Cl=C3=A9ment_VUCHENER?= X-Patchwork-Id: 8652491 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 91CF0C0553 for ; Wed, 23 Mar 2016 17:33:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B14C62025B for ; Wed, 23 Mar 2016 17:33:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D744D20259 for ; Wed, 23 Mar 2016 17:33:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756244AbcCWRdO (ORCPT ); Wed, 23 Mar 2016 13:33:14 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33769 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756198AbcCWRdN (ORCPT ); Wed, 23 Mar 2016 13:33:13 -0400 Received: by mail-wm0-f66.google.com with SMTP id u125so6007186wmg.0; Wed, 23 Mar 2016 10:33:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=dBswclaB+HVjEna530W8QrFxrXFeiNt+y7W7EYV60nA=; b=f4VWG80cX1sSe2QmzWz+iS4I7sfiUsLhGXxQrm9SfC7vUOplLy0CNQHG3jH9DX5f7W 1F1yqrrZNRX5zJzliZLZ0TQHzi3NqFCwZUiRJWcO/k5CSoKI4rkVgyR+A0dIQ8WZ1GRu z0jcjvIAuTPFL6rSoqoFGdXqxX1CtuU/TsG0JCI1VFs89XBw2Uu1TeK4X6JjtiTCqEW9 vxTUlDI8omh0Fl6dc6toxv4BONZ4O+0Et6m8zNtThGuG++19L6lDHDr3Q8lhnLq85Yaw 23mhNW/0z0ppprwzOKsz1EjcVAIUtPdr5OFAG8d9IfmxPpbP6ACAt9bD5GfCAoXBqT19 3nog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=dBswclaB+HVjEna530W8QrFxrXFeiNt+y7W7EYV60nA=; b=KjdzXvl8Fs2AuQWco4qNIMxvjkHjxYvuhqHhdg5KiTl7dHzytcfcw/ic2eX/ggwLa9 dhuRUWb8Om6qFpvIk4r6TxQlK69rmPOEzOe74Sge6JmXlf+DJrv28JqQ29YTW95UNFZJ OL1xlEGRggkb4Onf5aNn0GsgEw03PmpTqqcRrnEeCH+9J3NPHDbaZTot3NBrQxShgTc/ OeVBYoMy+2gkFwuB5cUegrKo1KZIw0K07MXVcomH5FhomP6PTGVAEDPsAk4ZbBS5jFkp YbwaeBGdO/nbrruxe4e5aQ8T9NHeddlq8shvyYMwmFDS9GmYG9Qyqe8DHAvuO4Jt2sf7 d3Og== X-Gm-Message-State: AD7BkJK5KTFVK1z5AHHuP/B8IYEri6e3ZGJFIJnTMVpU7Kf3VKafkmQxJYjpNppvaxIePQ== X-Received: by 10.28.195.136 with SMTP id t130mr29411103wmf.27.1458754392482; Wed, 23 Mar 2016 10:33:12 -0700 (PDT) Received: from arnab (ARennes-658-1-230-217.w92-139.abo.wanadoo.fr. [92.139.243.217]) by smtp.googlemail.com with ESMTPSA id wr2sm3562283wjc.49.2016.03.23.10.33.11 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 23 Mar 2016 10:33:11 -0700 (PDT) Date: Wed, 23 Mar 2016 18:33:06 +0100 From: =?us-ascii?B?PT9VVEYtOD9xP0NsPUMzPUE5bWVudD0yMFZ1Y2hlbmVyPz0=?= To: Jiri Kosina Cc: Benjamin Tissoires , linux-kernel@vger.kernel.org, linux-input@vger.kernel.org Subject: [PATCH 2/2] HID: corsair: Add K40 support Message-ID: <738ba88c7b19b1bc9424bf1eaa769c99268dde33.1458744569.git.clement.vuchener@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FROM_EXCESS_BASE64, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The Corsair K40 uses the same usage codes as the K90 for its special keys (although it has only 6 G-keys). Signed-off-by: Clément Vuchener --- drivers/hid/hid-core.c | 1 + drivers/hid/hid-corsair.c | 1 + drivers/hid/hid-ids.h | 1 + 3 files changed, 3 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index bdb8cc8..73860b9 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -1871,6 +1871,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_AK1D) }, { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_ACER_SWITCH12) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K40) }, { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) }, { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_CP2112) }, diff --git a/drivers/hid/hid-corsair.c b/drivers/hid/hid-corsair.c index 98f40aa..85b5168 100644 --- a/drivers/hid/hid-corsair.c +++ b/drivers/hid/hid-corsair.c @@ -151,6 +151,7 @@ static int corsair_input_mapping(struct hid_device *dev, } static const struct hid_device_id corsair_devices[] = { + { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K40) }, { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) }, {} }; diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 5c0e43e..ea9fef9 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -256,6 +256,7 @@ #define USB_DEVICE_ID_CODEMERCS_IOW_LAST 0x15ff #define USB_VENDOR_ID_CORSAIR 0x1b1c +#define USB_DEVICE_ID_CORSAIR_K40 0x1b0e #define USB_DEVICE_ID_CORSAIR_K90 0x1b02 #define USB_VENDOR_ID_CREATIVELABS 0x041e