From patchwork Wed Dec 7 10:00:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bastien Nocera X-Patchwork-Id: 30742 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp92242wrr; Wed, 7 Dec 2022 02:12:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf7lH8gUREnZ4BSkxzXsOFxDIDvyXtu5gvLTHYHqo2U/J0HxjZcxV6DD8BN72vYC3fl2NbZQ X-Received: by 2002:a05:6402:12d4:b0:46c:a78c:4dcd with SMTP id k20-20020a05640212d400b0046ca78c4dcdmr12339533edx.216.1670407953124; Wed, 07 Dec 2022 02:12:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670407953; cv=none; d=google.com; s=arc-20160816; b=wCexnDPsqG2Cn2qeQVwJldeJfYwKIJPbUiPzl3oFxVxUWu/H86dnIhq73MKgo67Ru9 ztHoNsQrnTRcr1HonJvrBq/Dr4QKtsrwvBda33SY/SJWlOTUl9tIIymjZ0K/FOIllZR+ ItD/QePJJ7Wzqx3htrWW+MaKAPZiwSK8deUk1VI+SPyrV4ngFeg3N198ygBMpH9+Q6PZ 3wq2FAUwSh93IDQ1TpYcTvqqBvh3BLybioDx8hpgqc6x+RSHuocSwx0I3kQ0PM5l+DKv gcWpdmecuRSVU92EKGFTTwOqxnbJ2iBxm/ytOv01qJ6zvwpFBsjUyVmg/b972/+3e40i 7Kug== 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 :message-id:date:subject:cc:to:from; bh=nmU9ppXsZ2s35OuTV+yW7jDm3MeZFNFFmSdDo8cxCGI=; b=Z0OB0aOPWDz74AHJUxcyRdeLNxZY2K8vPwjA9/bpMIYPYXT8ZuVSd0vfyPse0thuYT KLhHhM/PvV0NgYOra94Jwblh0R4DsGi2GeneGKZXWNtsx+A9FQT5642HD5nNmhdR3gqu IrI+w/UTPKGg64+lGN6CzOG4IuT6XrCW3JAYZHnu42U7XKwOh5Nqm0mW3z2x4Zgw3B8x TTPBrLk4AcI+Zhyn4pHbjKKM205sHWzJ3hzm4lDf5MuxmisIEmRDDZeFk6VTQdvNqtRS 8NKaez0kIiZOc2F+epJTv+zfTFRlSv5aJYGfXGMVp/BfwukF3acL0f8YhQztuVBQC3yk Cd4w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020a170906304800b007aec979f83bsi12232440ejd.745.2022.12.07.02.12.09; Wed, 07 Dec 2022 02:12:33 -0800 (PST) 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 S230289AbiLGKAt (ORCPT + 99 others); Wed, 7 Dec 2022 05:00:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbiLGKAo (ORCPT ); Wed, 7 Dec 2022 05:00:44 -0500 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FD813E0B4; Wed, 7 Dec 2022 02:00:41 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 971DA100018; Wed, 7 Dec 2022 10:00:33 +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_La?= =?utf-8?q?=C3=ADns?= , Nestor Lopez Casado Subject: [PATCH] HID: logitech-hidpp: Add constants for HID++ 2.0 error codes Date: Wed, 7 Dec 2022 11:00:33 +0100 Message-Id: <20221207100033.64095-1-hadess@hadess.net> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751549690107034187?= X-GMAIL-MSGID: =?utf-8?q?1751549690107034187?= Add constants for HID++ 2.0 error codes listed in "Protocol HID++2.0 essential features" chapter, page 3, in logitech_hidpp_2.0_specification_draft_2012-06-04.pdf Signed-off-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 71a9c258a20b..4c327969545f 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -225,6 +225,16 @@ struct hidpp_device { #define HIDPP_ERROR_INVALID_PARAM_VALUE 0x0b #define HIDPP_ERROR_WRONG_PIN_CODE 0x0c /* HID++ 2.0 error codes */ +#define HIDPP20_ERROR_NO_ERROR 0x00 +#define HIDPP20_ERROR_UNKNOWN 0x01 +#define HIDPP20_ERROR_INVALID_ARGS 0x02 +#define HIDPP20_ERROR_OUT_OF_RANGE 0x03 +#define HIDPP20_ERROR_HW_ERROR 0x04 +#define HIDPP20_ERROR_LOGITECH_INTERNAL 0x05 +#define HIDPP20_ERROR_INVALID_FEATURE_INDEX 0x06 +#define HIDPP20_ERROR_INVALID_FUNCTION_ID 0x07 +#define HIDPP20_ERROR_BUSY 0x08 +#define HIDPP20_ERROR_UNSUPPORTED 0x09 #define HIDPP20_ERROR 0xff static void hidpp_connect_event(struct hidpp_device *hidpp_dev);