Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2416239iof; Wed, 8 Jun 2022 04:39:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXaZMMKkW5PgqfegdctCnSbOE4gXHGyry2WQb8kK3f4dRNKlJFh+z3Whx8NECar7qmRJTQ X-Received: by 2002:a17:90b:3b4b:b0:1e8:434c:5ab1 with SMTP id ot11-20020a17090b3b4b00b001e8434c5ab1mr27554480pjb.129.1654688379647; Wed, 08 Jun 2022 04:39:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654688379; cv=none; d=google.com; s=arc-20160816; b=GWv2Z0ZjDnwUa/7Wz49F0m29HVFSTrL2qCKAljP+hd3OM+3sZDZCTfKiuidm1cn3QZ 9FFxold3KvW6z8xL7pCbRPFu1Ya9uKiSBr9SdFAwHEuWKGf8k4e85M1dr8PUDnggQZLP r68+5mBI9JtadyXHcnFTJNedkeWBY+iAhTGaDrMX2USg/vvijAGJ10E1uw9BXZyQXm6f wBDRescy/f4FDa5UpxjP16klIRbU4G/DWe/gZRqVsYo5eGZRKNJj/qJGg8tYWKLHSYjv MLyZHJUsnGGgWpe7uUAcozZVkc5htY73PSZvU6nlBdIhsy7CB8OIXd6LJ9hGDa99KNU0 98og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=383kKC+ecGwmZeML+KCL9D8ZydwcMM4hKDnF8PZB/nE=; b=lV54Svk5Dqeuqh1dxpLc4GWI1DcOPwg4a73mYwKK0DmwVbQyj683Qc1gtn5M0W/pYm yV+wA3lksc6gvm65bNwu+nIsnAU2hxB6gRNwc4KawGLX+HN38QDe5Ohmn1pqZ6WMXwhr 0+tviSPcBJbhkhL7v8pmpJT/Nbg62un4CkyYUuHLQkMxPBodQELkiU1Z/c9nLJ7SklNm lywRdawW1zePdAWR7HrbJxezcEjoegIJcO+hQqeNM/7/Axy0Y/qId6b87zUb3LCR4S7C YBabMhwhscqBd8wbb81odI35LqPsVuGIgAzcR+NOrdlnOj3e2lwvniaIwG8SqtjLeElj Y3Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J72rdBT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n9-20020a170903110900b00167839e8126si12206380plh.590.2022.06.08.04.39.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 04:39:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=J72rdBT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 69DA219FD47; Wed, 8 Jun 2022 04:07:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237755AbiFHLHi (ORCPT + 99 others); Wed, 8 Jun 2022 07:07:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237758AbiFHLHd (ORCPT ); Wed, 8 Jun 2022 07:07:33 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6097419B691; Wed, 8 Jun 2022 04:07:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F25B5B826E0; Wed, 8 Jun 2022 11:07:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92E2DC34116; Wed, 8 Jun 2022 11:07:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654686445; bh=Xh9ijLZzb53sng45/ClJFX3kzZcCCZ+7wszfgVVtkFQ=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=J72rdBT0BYrBchDWCvCe3E6RdwXTHZgTxBD6QmpED84s+7ipVk2wqSDTqNOd3NzM5 LlFbvvUJFXoiww48UasPKo3fvgeNyNSjI7D4qnBR9806k0Lr5vcp9fKGq4FLgX7EJ6 IvdQJ87C/wey74LoWHHTaib9qFHoxqby45J/1UYZGR8zFRCmu1pQvg0tgnJIMk7VXT tDwf1zANupD2AHNuc0j9ZeshlKDbno/ZVooUkdfWegLd21wrfEefx39nV/EfY0xYMl duy35yLL5XxwLmI09jLQHir13/D5wRJFJ6850Cc74y/gErEDgi0nZYfLv2n06h1B2l SRswhBofSLrfQ== Date: Wed, 8 Jun 2022 13:07:22 +0200 (CEST) From: Jiri Kosina To: Maximilian Luz cc: Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] HID: hid-input: add Surface Go battery quirk In-Reply-To: <20220525230827.1019662-1-luzmaximilian@gmail.com> Message-ID: References: <20220525230827.1019662-1-luzmaximilian@gmail.com> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Thu, 26 May 2022, Maximilian Luz wrote: > Similar to the Surface Go (1), the (Elantech) touchscreen/digitizer in > the Surface Go 2 mistakenly reports the battery of the stylus. Instead > of over the touchscreen device, battery information is provided via > bluetooth and the touchscreen device reports an empty battery. > > Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore this battery and > prevent the erroneous low battery warnings. > > Cc: stable@vger.kernel.org > Signed-off-by: Maximilian Luz > --- > 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 d9eb676abe96..9c4e92a9c646 100644 > --- a/drivers/hid/hid-ids.h > +++ b/drivers/hid/hid-ids.h > @@ -413,6 +413,7 @@ > #define USB_DEVICE_ID_ASUS_UX550VE_TOUCHSCREEN 0x2544 > #define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706 > #define I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN 0x261A > +#define I2C_DEVICE_ID_SURFACE_GO2_TOUCHSCREEN 0x2A1C > > #define USB_VENDOR_ID_ELECOM 0x056e > #define USB_DEVICE_ID_ELECOM_BM084 0x0061 > diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c > index c6b27aab9041..48c1c02c69f4 100644 > --- a/drivers/hid/hid-input.c > +++ b/drivers/hid/hid-input.c > @@ -381,6 +381,8 @@ static const struct hid_device_id hid_battery_quirks[] = { > HID_BATTERY_QUIRK_IGNORE }, > { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO_TOUCHSCREEN), > HID_BATTERY_QUIRK_IGNORE }, > + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO2_TOUCHSCREEN), > + HID_BATTERY_QUIRK_IGNORE }, Applied, thanks. -- Jiri Kosina SUSE Labs