From patchwork Thu Aug 30 21:56:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Cutts X-Patchwork-Id: 10582933 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 74A0C5A4 for ; Thu, 30 Aug 2018 21:56:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 632212BE32 for ; Thu, 30 Aug 2018 21:56:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 577142C24B; Thu, 30 Aug 2018 21:56:35 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 008592BE32 for ; Thu, 30 Aug 2018 21:56:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728049AbeHaCAt (ORCPT ); Thu, 30 Aug 2018 22:00:49 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:44028 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727980AbeHaCAs (ORCPT ); Thu, 30 Aug 2018 22:00:48 -0400 Received: by mail-pf1-f194.google.com with SMTP id j26-v6so4480397pfi.10 for ; Thu, 30 Aug 2018 14:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Rfg9rzUuVH60O1UxfmaDA50ly54WqIEeTGdSH0qZedo=; b=jBDSFIdsNFgf07jX7/BSm57CebfNJqzTKc8JtFNuVGTaHfsIzBXelTqIqkJAdjNsD6 BD60X6IGBOpLUt3uCJDkM+O0kugzwToXPijABaCXgOxo3loFgycmoPY8QtSPa1LNuWWz 7B4HyHJf9+/4770rN4D8RFPbsraMBTDtZxqWM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rfg9rzUuVH60O1UxfmaDA50ly54WqIEeTGdSH0qZedo=; b=PpsPQQ8QaGrUhHroTChNt1hGyBVo61eWnxTQSymE4fH+jcvwbEMsGS5nPbrk0mUgtn Ur5fwNedXLdRe4YWkWNNj6qoMMHavjLVmFrep/eam0DlIeP9VjmGYvrS3+jLwf7jhFN6 wgkOUb0xE6nkDKBwrSWovcT46qbJlX0oIo+YDzUqGneUMze956NI3m4awW91ZPcfhzge F6eViIh++RqMmGb9eaZJ64wYZ+AumDtJWHX5tHq4/jkrxd6uBShdvngQ+xzJQsmX17W0 FsGbMrjgVsVIWFfHfolBC9a1aN1IEnPrD6Ct2AEkG2mxeMroDhRM/SPsiazFmVlst9BF HthA== X-Gm-Message-State: APzg51C8OeS0TaxZ5Vr2hGBGSRM85XoTDxQbgW7aBfy9qC5ThOW+Qax6 y2TpEzpAq/XBV/eew/jTMevuhlDtpb4= X-Google-Smtp-Source: ANB0VdZ1AnKQkcVAqlSIPxYIYysZ/EtSTB1QT71LfcuX81JVI7olzs7qouw5xrQNdcvB0RUDVrbeVA== X-Received: by 2002:a62:2285:: with SMTP id p5-v6mr12472726pfj.53.1535666192116; Thu, 30 Aug 2018 14:56:32 -0700 (PDT) Received: from kolhar.mtv.corp.google.com ([2620:15c:202:201:356a:9de2:526a:5bc]) by smtp.gmail.com with ESMTPSA id h132-v6sm13516828pfc.100.2018.08.30.14.56.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 14:56:31 -0700 (PDT) From: Harry Cutts To: linux-input , LKML Cc: Jiri Kosina , Dmitry Torokhov , Benjamin Tissoires , Harry Cutts , Jiri Kosina Subject: [PATCH v2 5/5] Use LDJ_DEVICE macro for existing Logitech mice Date: Thu, 30 Aug 2018 14:56:22 -0700 Message-Id: <20180830215622.47550-6-hcutts@chromium.org> X-Mailer: git-send-email 2.19.0.rc0.228.g281dcd1b4d0-goog In-Reply-To: <20180830215622.47550-1-hcutts@chromium.org> References: <20180830215622.47550-1-hcutts@chromium.org> MIME-Version: 1.0 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 Signed-off-by: Harry Cutts --- Changes in v2: * Changed the REL_WHEEL_HI_RES code to use micrometres (a.k.a. microns) as its units, instead of 256ths of a millimetre. * Removed support for mice connecting over Bluetooth, due to a bug where the mouse's high-res mode and the driver's settings get out of sync when the mouse is power cycled. * Moved the creation of the HID++ 1.0 function and the refactor to use the LDJ_DEVICE macro into separate patches. * Added a couple of explanatory comments to the Logitech driver. drivers/hid/hid-logitech-hidpp.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index fd6a8c325fa0..5f0c080059c6 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -3314,13 +3314,11 @@ static void hidpp_remove(struct hid_device *hdev) static const struct hid_device_id hidpp_devices[] = { { /* wireless touchpad */ - HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, - USB_VENDOR_ID_LOGITECH, 0x4011), + LDJ_DEVICE(0x4011), .driver_data = HIDPP_QUIRK_CLASS_WTP | HIDPP_QUIRK_DELAYED_INIT | HIDPP_QUIRK_WTP_PHYSICAL_BUTTONS }, { /* wireless touchpad T650 */ - HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, - USB_VENDOR_ID_LOGITECH, 0x4101), + LDJ_DEVICE(0x4101), .driver_data = HIDPP_QUIRK_CLASS_WTP | HIDPP_QUIRK_DELAYED_INIT }, { /* wireless touchpad T651 */ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, @@ -3360,16 +3358,13 @@ static const struct hid_device_id hidpp_devices[] = { { /* Mouse Logitech Performance MX */ LDJ_DEVICE(0x101a), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 }, { /* Keyboard logitech K400 */ - HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, - USB_VENDOR_ID_LOGITECH, 0x4024), + LDJ_DEVICE(0x4024), .driver_data = HIDPP_QUIRK_CLASS_K400 }, { /* Solar Keyboard Logitech K750 */ - HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, - USB_VENDOR_ID_LOGITECH, 0x4002), + LDJ_DEVICE(0x4002), .driver_data = HIDPP_QUIRK_CLASS_K750 }, - { HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, - USB_VENDOR_ID_LOGITECH, HID_ANY_ID)}, + { LDJ_DEVICE(HID_ANY_ID) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G920_WHEEL), .driver_data = HIDPP_QUIRK_CLASS_G920 | HIDPP_QUIRK_FORCE_OUTPUT_REPORTS},