Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4114818rwe; Tue, 30 Aug 2022 05:03:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR4EcG0VpWNDVcaX/hJvF74pH+5luiQat6FCkY8o4Mkcgm7JCtjbrxX9EP39hVpRxL2WbPNW X-Received: by 2002:a17:90a:ca98:b0:1fd:e46a:6c92 with SMTP id y24-20020a17090aca9800b001fde46a6c92mr7761654pjt.116.1661861025166; Tue, 30 Aug 2022 05:03:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661861025; cv=none; d=google.com; s=arc-20160816; b=YmS4fMmEumpwXfrHHW1rNAFpgU/u/sqfI2fewnEEXVbXGcckjZA4Lq/K+9ah3RVDQI BCkK5PbGSvElLasjjnX6R1y4xyGiKnDT1zItPDKj2Y8IkGjmjyfICVO9i33r+0rAaSqL XpknzmZoN09Al6SstTSeeawiiZ/vpMQxEnrkjbfeNV8zmPQAxk3docwuFE8UTPQXiMTb mdOxOszylg2knNmAX7T8V1OmQxLms3N595J516+jBW2lYiyDAYaLc2zGjsovZ0Sz4ub1 1xYGZRo5ijsYRquelg8AJDugaJCGQxIPja0rI4nc35xqEmFLpNRs0wPyEIaRPOa4qdj2 u0rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+ENp9tIGLtcv2T5PDuB0WT5shCp5mxuV17Wk4YvN83I=; b=TUmODska2uDtUUnpRXkGoJnHWnan8DloDW/lKakZzMCjChsmg0fM1rBfaa9DHCTPh3 88J+qCSztFQJQv7x29XGZ/XDfMFrH3n0BCzeSpc+12+WMrp/STlZJRCfprbcunLirrHi Iqg8wgzvgs/6pG8u6FE5eSj0cCVk5AfCo3ZLavfbDQXZHEBrR8EE1DHOE3/ABjoP3qRc 9+WVVsrw+GAWI3uBpl+PaQI3vck86/03ryCs2+VcHZLXF3sUYCRuaZvuu2KC4QAYRpXa DgjYHixZ0EQKOfPVqIxLiOUS6ZIBGATJwqAoVPIFvv+HPayTZO2c9mOcPvR9zRXtPSJe lwKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a056a000ad100b0052e6157905asi2723611pfl.24.2022.08.30.05.03.33; Tue, 30 Aug 2022 05:03:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230049AbiH3LjO (ORCPT + 99 others); Tue, 30 Aug 2022 07:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231168AbiH3LiN (ORCPT ); Tue, 30 Aug 2022 07:38:13 -0400 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F4E01636DC; Tue, 30 Aug 2022 04:36:36 -0700 (PDT) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 3943E40009; Tue, 30 Aug 2022 11:36:22 +0000 (UTC) From: Bastien Nocera To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Benjamin Tissoires , "Peter F . Patel-Schneider" , =?UTF-8?q?Filipe=20La=C3=ADns?= , Nestor Lopez Casado Subject: [v2 5/5] HID: logitech-hidpp: Remove hard-coded "Sw. Id." for HID++ 2.0 commands Date: Tue, 30 Aug 2022 13:36:15 +0200 Message-Id: <20220830113615.4414-5-hadess@hadess.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220830113615.4414-1-hadess@hadess.net> References: <20220830113615.4414-1-hadess@hadess.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some HID++ 2.0 commands had correctly set a non-zero software identifier directly as part of their function identifiers, but it's more correct to define the function identifier and the software identifier separately before combined them when the command is sent. As this is now done in the previous commit, remove the hard-coded 0x1 software identifiers in the function definitions. Signed-off-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 9c8088d8879e..31e2ca97e0ad 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -859,8 +859,8 @@ static int hidpp_unifying_init(struct hidpp_device *hidpp) #define HIDPP_PAGE_ROOT 0x0000 #define HIDPP_PAGE_ROOT_IDX 0x00 -#define CMD_ROOT_GET_FEATURE 0x01 -#define CMD_ROOT_GET_PROTOCOL_VERSION 0x11 +#define CMD_ROOT_GET_FEATURE 0x00 +#define CMD_ROOT_GET_PROTOCOL_VERSION 0x10 static int hidpp_root_get_feature(struct hidpp_device *hidpp, u16 feature, u8 *feature_index, u8 *feature_type) @@ -937,9 +937,9 @@ static int hidpp_root_get_protocol_version(struct hidpp_device *hidpp) #define HIDPP_PAGE_GET_DEVICE_NAME_TYPE 0x0005 -#define CMD_GET_DEVICE_NAME_TYPE_GET_COUNT 0x01 -#define CMD_GET_DEVICE_NAME_TYPE_GET_DEVICE_NAME 0x11 -#define CMD_GET_DEVICE_NAME_TYPE_GET_TYPE 0x21 +#define CMD_GET_DEVICE_NAME_TYPE_GET_COUNT 0x00 +#define CMD_GET_DEVICE_NAME_TYPE_GET_DEVICE_NAME 0x10 +#define CMD_GET_DEVICE_NAME_TYPE_GET_TYPE 0x20 static int hidpp_devicenametype_get_count(struct hidpp_device *hidpp, u8 feature_index, u8 *nameLength) @@ -1969,8 +1969,8 @@ static int hidpp_touchpad_fw_items_set(struct hidpp_device *hidpp, #define HIDPP_PAGE_TOUCHPAD_RAW_XY 0x6100 -#define CMD_TOUCHPAD_GET_RAW_INFO 0x01 -#define CMD_TOUCHPAD_SET_RAW_REPORT_STATE 0x21 +#define CMD_TOUCHPAD_GET_RAW_INFO 0x00 +#define CMD_TOUCHPAD_SET_RAW_REPORT_STATE 0x20 #define EVENT_TOUCHPAD_RAW_XY 0x00 -- 2.37.2