Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp4240280rwe; Tue, 30 Aug 2022 07:01:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR6dsVjB5ugMAVZqXBMofLx4VGlMaDRx5n3gto5lyvyW3EIB4kJqmWG4rL0rq0hzPaxHuQLp X-Received: by 2002:a17:90a:f2cb:b0:1fd:90a0:56e3 with SMTP id gt11-20020a17090af2cb00b001fd90a056e3mr16791187pjb.113.1661868078228; Tue, 30 Aug 2022 07:01:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661868078; cv=none; d=google.com; s=arc-20160816; b=dSXQzBwkWgOOelab2i3gOMIEdHmIjS3Qam29xHW3umV5PYwD9BtU7mIKLk44PcxrlK Btdk77NaaW7ftRbl4OW8PybhEiM/qCOLMcV5v9qZV/HZSQ8o38oCUWGDvEPqE2tLxVCs dqAJ1LF9WYr4UnXjF2czxETrkxCMhUq6rCpwiGAXJUOErcaAEO97LfMPc/T6TfMie+5d XfN87Xf4X30EeBSsY9bonkOybfE8Is5q0RTFRAjtDYsYpXgvPczFXjxweHJJga74csc5 x+uJIs1VSAKMP+PTADSbgcmrxE5rLjfyBkZ/p6OPpR83g/oZMt0vOYhS/OZGEpbVEwBF 4eJA== 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=RMfWjIUuKIzqd0E2vuf/qkLEsQJwDuF7mtHLxK6kGpo=; b=s/31cQy35DSkbKfL0vKdIXbtJDA2mgCoJ1+5+9LvSz76Hp7b74ewj/l6Q5r4s08DiF jI80RQFqo6HGyckTZemhJQzFHRGUEdmn9FMKTk88w5n13mIwLy+pq/xFkGyygrdDwQWE iYvQC6UnObx+FhA3AdF1EkdnyPI8LGqwD9xfY9+svMY31HxgIC/961RN3qvrSqc6YA0g XlIz3ajv71iYlo7iGWBVxKbPNo+dnGjYT5LaK7M2IAjQTRR88zpr80lPPmy4S3DU1kt6 hk+dzBYIGWE9Pert1N2qq9jLyv+oTuVudajyEAmPyslYgkQCy1Hge/UOUC5xrIwr3Wxt t4Kg== 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 lx5-20020a17090b4b0500b001fab347b80csi14100849pjb.171.2022.08.30.07.01.01; Tue, 30 Aug 2022 07:01:18 -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 S230336AbiH3N0d (ORCPT + 99 others); Tue, 30 Aug 2022 09:26:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230291AbiH3N0U (ORCPT ); Tue, 30 Aug 2022 09:26:20 -0400 Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95FE293201; Tue, 30 Aug 2022 06:26:03 -0700 (PDT) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 76FDC20011; Tue, 30 Aug 2022 13:25:57 +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: [v4 5/5] HID: logitech-hidpp: Remove hard-coded "Sw. Id." for HID++ 2.0 commands Date: Tue, 30 Aug 2022 15:25:49 +0200 Message-Id: <20220830132549.7240-5-hadess@hadess.net> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220830132549.7240-1-hadess@hadess.net> References: <20220830132549.7240-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, 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 e51ccf2c04e3..74013d0e0a24 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