From patchwork Thu Nov 24 17:49:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= X-Patchwork-Id: 25661 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3534083wrr; Thu, 24 Nov 2022 09:52:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf6bcfF/1YTK2ErHIZv4LPMOjPjAEDBCse2U5fsZhWR2fPe4GA7iVXB1WirtLK373yMHgjIw X-Received: by 2002:aa7:d9cf:0:b0:469:a1de:4656 with SMTP id v15-20020aa7d9cf000000b00469a1de4656mr18920283eds.425.1669312362812; Thu, 24 Nov 2022 09:52:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669312362; cv=none; d=google.com; s=arc-20160816; b=E0HFRQrsbkbx/MISbsY3OolrdqdFI7Jjb51/EyKOftYS09hrrEqa5yWuTxcMX9bieA qAE7ndI1Nfd9Mj9qwEUqw2x9lyf4O5Sne8ka3B6QIJ8JIlbrFmIMVVSc6+CVXi0oYCtF h8M8qeVecBXt8j7yMQdV+6MJhW39Y4zJu7kg6Ff4z1jw7cvwBAJp7+gOfdZNKn6MVGQ1 xw7+3uO0rKWBPikdDA5lj2ZLDlOzuiqmPFvmKr9jthAltuTeVLzM9fogCXXT5cc+NJP4 zB/zoPOYNn8hFYjVXiOfCz7nBdbeYE2K7lrSMtNX0zsJ99S+kluWnAkJZXpZGqC7GTkl VJmw== 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:dkim-signature; bh=tgu1S+TzWjxezuwZWvW8G0xaAwqhwcK2Xvhbfkdzhnw=; b=UIY8ocWvQ9NHPLat0SaSCq46plmMQ4XKZOk1JGijZ97Lp5GX+ecOXQQqSsEQ0SQSIx EXRYkiheU1hVnYLbjYgmsKLkLoh+rLZl7maJmuV5ShE3x7apy25ngNZCfbhO0PSxhWpe npFV3b+NI0Xoa8Dz8QJ5q12/wIkXuhwqNdpBswuvfVcW7GJu5Bw49Vr3mcUSduz4x/BZ SohmuImbGx9pnvV2q4aG1sG4H2FHz9SqokkH2yRJ1rK79VRPe1/S1WJJsYz4fGUdbMYx xYXUhwDEOV3YQi1dFW3snfBwOIgprvc8BEyFzAHV3WozPJUIV+YmlYQAWMYqR0vOpr2e cptA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TPz63x7A; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt15-20020a170907728f00b007ae2368c8b7si1512745ejc.138.2022.11.24.09.52.15; Thu, 24 Nov 2022 09:52:42 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=TPz63x7A; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229763AbiKXRuZ (ORCPT + 99 others); Thu, 24 Nov 2022 12:50:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229731AbiKXRuN (ORCPT ); Thu, 24 Nov 2022 12:50:13 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3492914FEEC; Thu, 24 Nov 2022 09:50:05 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id i12so3525012wrb.0; Thu, 24 Nov 2022 09:50:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=tgu1S+TzWjxezuwZWvW8G0xaAwqhwcK2Xvhbfkdzhnw=; b=TPz63x7AorUW6wbH1Kvue2WrHoN/ALDD3ZtKdx89/Z7iLzg39IR2+BpAGtA88VLr9I WoS/MPiEBruqKqjbKJgXNtsaZakNbylBc5M/dti/nS4M1pKFmVghHVwiNdMdaBm49ag3 /EpRytkPwgJTiBYXcKsN5T8Fog7B86duO4OA5y1zWWGyHWzc+TcAX8cl582bTXv78KSc ZaZaKpvt6z1C+qI2DFp9wwfwJrn9IKwB3rlpDLY6I3pPZjJWJstzQwdlDDIwmEK9HnhZ x707pEio0DZENNY7vuQEPzVTK3/0q4HLdjoN1QjsRQJXfTczH9Rb5RNP1Xs3ulrdfM9W eEUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=tgu1S+TzWjxezuwZWvW8G0xaAwqhwcK2Xvhbfkdzhnw=; b=0IrBnQYtnu/WnneQJroSrAMPf5m2zx24byLkEHr64b9mZxMQCO1OUrgeEJOukxhVae B22qoDWAy7YOMD2xOpQIGThq2KT93TbjslfRBtYv/SFpFBexOPnRK3pLAw23+yrZVBiu kO15rg5i7AjTQ8cx/+a2gBDFgL97pXdSJIszL/QaMZ2ZrsmeBaK8lB4ey/dxWkW3z4Mb q4vO9Nr/aVTFc56uT/3VqOTXIKbj6PoSHXqQTc+DDUYbfCRBiqu8KqyLDmh2n1b7AILT sFjxCVGYZYaU2QMX8yrwHs4/9vWyPEbJ15ejULPKnM6t2jrz6AB58wPym+xUm1pIj9Os OYaw== X-Gm-Message-State: ANoB5pmuw6GqLszHZM2xZwOdO6uEsoaSOMAOW0g1r9Kb5sAlnAaEGAW2 EdA8GqWLf+whfgFpsEmUAIU= X-Received: by 2002:adf:e7c3:0:b0:241:dfce:9bfc with SMTP id e3-20020adfe7c3000000b00241dfce9bfcmr9613111wrn.697.1669312203442; Thu, 24 Nov 2022 09:50:03 -0800 (PST) Received: from localhost.localdomain ([94.73.35.229]) by smtp.gmail.com with ESMTPSA id z14-20020a7bc7ce000000b003cf78aafdd7sm2351142wmk.39.2022.11.24.09.50.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 09:50:03 -0800 (PST) From: =?utf-8?b?Sm9zw6kgRXhww7NzaXRv?= To: jikos@kernel.org Cc: benjamin.tissoires@redhat.com, rydberg@bitmath.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?b?Sm9z?= =?utf-8?b?w6kgRXhww7NzaXRv?= , Ioannis Iliopoulos Subject: [PATCH] HID: Ignore HP Envy x360 eu0009nv stylus battery Date: Thu, 24 Nov 2022 18:49:32 +0100 Message-Id: <20221124174932.6105-1-jose.exposito89@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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?1750400880292686929?= X-GMAIL-MSGID: =?utf-8?q?1750400880292686929?= Battery status is reported for the HP Envy x360 eu0009nv stylus even though it does not have battery. Prevent it from always reporting the battery as low (1%). Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/823 Reported-by: Ioannis Iliopoulos Tested-by: Ioannis Iliopoulos Signed-off-by: José Expósito --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index dad953f66996..1423441be6dc 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -411,6 +411,7 @@ #define USB_DEVICE_ID_HP_X2_10_COVER 0x0755 #define I2C_DEVICE_ID_HP_ENVY_X360_15 0x2d05 #define I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100 0x29CF +#define I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV 0x2CF9 #define I2C_DEVICE_ID_HP_SPECTRE_X360_15 0x2817 #define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544 #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706 diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 859aeb07542e..a4841fee092b 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -377,6 +377,8 @@ static const struct hid_device_id hid_battery_quirks[] = { HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_15T_DR100), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_ENVY_X360_EU0009NV), + HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_HP_SPECTRE_X360_15), HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN),