Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2868354rwb; Mon, 15 Aug 2022 12:58:54 -0700 (PDT) X-Google-Smtp-Source: AA6agR6CE1I/gNp5FbohTw8yo9FKLUrxwvSifyqJtQr6PLW4X4PqsSt4aRPEWT3WcG/t0kBCBFkY X-Received: by 2002:a17:906:ef90:b0:730:9af7:5702 with SMTP id ze16-20020a170906ef9000b007309af75702mr11444169ejb.107.1660593534398; Mon, 15 Aug 2022 12:58:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660593534; cv=none; d=google.com; s=arc-20160816; b=AifqHsC1l8WjhVr9SPBUFxp/5z0sHLbgp64wv2CS98MMWqK6aT0Rk9d2o8rfrQmgAq IWZD0siEg3nlcpiWGihnsTNi30mRr27j+LDX4NNrTyhrxFaqsY5cRqBMlLEFpkn5g1fK upNt/Dcwb8YScc96pE1YueaupzylO4gSDPW9h26BOdhC0/l8hUzVPp5ZBtzgeTxszTor vxOPb6Y2YhsKIejJwTrgAYR3/bNHMhfKdcFbI22K6FSRDzhuy1X4hqmnjSYMG1CIavWU NGoFGKhfNqI/Q0+7xmlwSKKnkQ8SGTeYG13c7ssEj+Vl5ZXv3EOK7ZYDId2Q/IRjqUK/ hBHQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8seQ0/lfr0mBu0vRYo9zuNrpWcxICW7R6hVJr2YX+HM=; b=r9cA9ZxIa248xmgHT0z3mN040mJWHadJjh7SSiKFBnhfHEHxvdRxqL5bWCZYRkm+r0 u9Z/PWm3/+Dkvtyo1F5Z6vLZn33SnQYSIiRBxGkQt5AhGVBPwwf0iB1oQ+YqGOenDLq3 8xLlkqZlAyPjodGHbvzIFBsHrwnu8RzYDNbp1+KBJBEO7ZQtbld9kQyDVbIwEfDZyprm vqUDTP1hlgI2iZRWNU3PHlFef1PKsKKz2CWVK0Biyj8o/5t3WutD2B/UaDeM32X7zwPW JAzLGtde91U9uxJQ18ht+EKboh3XRxqjcw9maa9dFIFmFQESJOY4GbDNAiRecQRJJHUP g1AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y0vd2kyI; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v8-20020a056402348800b0043d98dddc27si9253635edc.59.2022.08.15.12.58.29; Mon, 15 Aug 2022 12:58:54 -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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y0vd2kyI; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239209AbiHOST2 (ORCPT + 99 others); Mon, 15 Aug 2022 14:19:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233444AbiHOSSY (ORCPT ); Mon, 15 Aug 2022 14:18:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9D642B252; Mon, 15 Aug 2022 11:15:57 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 87F496129E; Mon, 15 Aug 2022 18:15:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FD4DC433D6; Mon, 15 Aug 2022 18:15:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587357; bh=neXb9KTr9GRL9Tu9sQdl0k7yuZVxlsmpLVStMiQm83g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y0vd2kyIdgqTdKTyO01wPA2cThlg6vl3WVUJvbyJuLcBfyVajOzPTBLU4/+Tjts4d yDNoRhsFfeLJg5T+yIk2wjpqUyljkscILfD697hJJwyXo5a+Wwt03ljAkpc4SJ4spE vTQ5/gkYZQGlEEWgPKQCNJGxiFuFMH9WLLK5YlLI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Maximilian Luz , Jiri Kosina Subject: [PATCH 5.15 017/779] HID: hid-input: add Surface Go battery quirk Date: Mon, 15 Aug 2022 19:54:21 +0200 Message-Id: <20220815180337.929205479@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 From: Maximilian Luz commit db925d809011c37b246434fdce71209fc2e6c0c2 upstream. 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 Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/hid-ids.h | 1 + drivers/hid/hid-input.c | 2 ++ 2 files changed, 3 insertions(+) --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -398,6 +398,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 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -333,6 +333,8 @@ static const struct hid_device_id hid_ba 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 }, {} };