Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3163702rwe; Mon, 29 Aug 2022 06:58:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR7R3NbR+4FE39n7pRHeKkIXkufsJcmkpdkWmspOoWBY6nGdEH3bS0Os3rFsabQpm+KqYg+n X-Received: by 2002:a05:6a00:21c5:b0:52b:fc9c:295b with SMTP id t5-20020a056a0021c500b0052bfc9c295bmr16907642pfj.56.1661781495922; Mon, 29 Aug 2022 06:58:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661781495; cv=none; d=google.com; s=arc-20160816; b=FP5K8NcVjSajNXyX+9BNZLDH9akBiAUu06IKtI0oqmdXH0VQ7NZKkKSpsjbYsqodvx itoCbel1mDo5wq95iZFlnD66FtrYAnmBPbYk1julmry6e0WmVw5D/aN89zBr8az3QEaE 6Fi6SjBiwTmrlHl8Q3hBFn69kvzBPLtnXx1QyUU6DqpIv22SK4SQGgnQelP7ipFUmnrO uUxoRi40GGngmDbLqBtitSB++SJsjAHitAs8xOb2xw/XQSDMu3Wft/Kd+je7qmQyfzIU KVpyeLAIZLku0aeDaBFct5ALG7zSNoCkeCTCkYkZ3KwVIbRcRAmqQ8JSGCoKzumKL/Og aSzQ== 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=86rpZF88Nr4PWEVp8z38mKCSUhmzlGFmpfJu+/+hlQY=; b=VC4Ki+gvnBPoTDy4nBODY4I6rUohIowkhQcdKI4fs128qxT94csPPTFqWgfs6PNmsd 24KKO98JfzuP/2nNv3fSuxhZhoOQIua8Py5A+5wsFqArZFg+65M9GZ5X+SW/zpQSADpR Gtqf8MCZYd9WDqIHDNiG1tukk4cnzE+9l7pIRBKwruODJSEJuir6Q5Y5y/u62wmXn0a/ B4qkTbX9l6YTx5/YcxCD6NPoG/KSRGnl2RitSplz0v33jpPYt3Jz7Uc2DRBcV4s+YJUM cbBgQfe2LZQKnrEuBcm0UALt2iM5bCSUNuqeiUQnQtpbbGQHgXpWRo0JZDwNI2KugfY2 +rhw== 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 bv7-20020a056a00414700b00537e9dcebecsi7018403pfb.115.2022.08.29.06.58.04; Mon, 29 Aug 2022 06:58:15 -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 S230038AbiH2NtD (ORCPT + 99 others); Mon, 29 Aug 2022 09:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229759AbiH2Ns7 (ORCPT ); Mon, 29 Aug 2022 09:48:59 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E74DA72FD7; Mon, 29 Aug 2022 06:48:57 -0700 (PDT) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 1FCFBE0015; Mon, 29 Aug 2022 13:48:54 +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: [RFC v1 2/2] HID: logitech-hidpp: Remove hard-coded "Sw. Id." for HID++ 2.0 commands Date: Mon, 29 Aug 2022 15:48:52 +0200 Message-Id: <20220829134852.312548-2-hadess@hadess.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220829134852.312548-1-hadess@hadess.net> References: <20220829134852.312548-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 02f8c99672c7..46b3e51cb854 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