Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp1972251rwe; Fri, 2 Sep 2022 06:49:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR5dfW7G4a8Fdv36MjAWbg2+ysHR83/fc8acrswx6V1JoBkLUMW3HPNJVRwEUGCAT4iVIxes X-Received: by 2002:a17:90b:3d01:b0:1fe:682:6517 with SMTP id pt1-20020a17090b3d0100b001fe06826517mr5003363pjb.215.1662126544916; Fri, 02 Sep 2022 06:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662126544; cv=none; d=google.com; s=arc-20160816; b=auPGe0BcByJ1kNZxqMYqEKdGzFnpZN/MtXWzIsyhb7C/ALI8+SbwoyxwJC8rnJXIP0 ldcHxVaRYnOAMfun+skCkCXxfBD4YYtJn1E0Gqa7BSH3NTvch2ppVUQdUWP7o6cy7LiD gwH7d/K8wfJK08ywOcSX6zncdGSCdxuzlbTJBUA2I3o8JhnoWqELQkLV7hIPfT0SUpvu sRqIkHVK/4o2j4yh9vWJN6J5rQ+2RBaMKRISGgRSUGXYoeNLKbZrlj3eRdmDZbP/Zlpj Pw32p6cFa1f+aJRHylgLZTLSp2fHbese4A3TJ5HRs5+xUmbk0ejnXRIyryTZvJ61iqJv 42ww== 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=YcSxDi/6jia5Kc/SzM8KuB57KtqjME4ShsbrdPfbYG0=; b=SkuV5FXf0hcFI/LMrG9EmBSDBYZS91ZEwWynR8wptmMPT66ql4ZqvO2Sn4v3KhyvL/ tRe1WF7gRUDAgmEjCRR+qoNvR+XmPf5Yk9lIN2FxUM9c3Y0NliFqcpseYUzOQIM8OvUr S7ezncMfT+jU7D06b1qM4n3k74xNwiPigdC0kPqCyOFX6RXhyRHzV6CIgQIbswtxkFUs q4+nlGN1KqYGpbPspRJVsOGnukQe7uLa2hxq3F0CMhjgYA2j1U9xkJM4d0Ek/0pViBk2 ACV8HFfP3T20bY/jfE+EjeTY7crPEk+MRUy3KHc8luesy/qjQ5kS4lPikFCF9CGwQ4VG 5ypw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xbC8GQra; 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 q30-20020a63751e000000b0041c1e063bb3si2231136pgc.369.2022.09.02.06.48.45; Fri, 02 Sep 2022 06:49:04 -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=xbC8GQra; 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 S238706AbiIBNGE (ORCPT + 99 others); Fri, 2 Sep 2022 09:06:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238644AbiIBNE5 (ORCPT ); Fri, 2 Sep 2022 09:04:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 883BF1123B5; Fri, 2 Sep 2022 05:43:22 -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 225BC6215A; Fri, 2 Sep 2022 12:35:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D059C433D6; Fri, 2 Sep 2022 12:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662122129; bh=IC0Xcmb1kumLQWLiI4eJziIM3Bb2aDtDDQkA3g87UtU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xbC8GQra80jAdf+wJ2iZS0FbMAJu01/GGlGEG5kKC4XY2irQWR+aPXStBi/Bujxyy uNDAlYWI84koikYFjl07UgUHTS9/hd7kQw4s87BhfiSObDfuBgUFKtEPizqcsiy0sq AjkcaTIWVNR5hu4JqCGCnVwAvC+PjcVIs8uNyg5E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steev Klimaszewski , Jiri Kosina Subject: [PATCH 5.19 21/72] HID: add Lenovo Yoga C630 battery quirk Date: Fri, 2 Sep 2022 14:18:57 +0200 Message-Id: <20220902121405.483023351@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121404.772492078@linuxfoundation.org> References: <20220902121404.772492078@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: Steev Klimaszewski commit 3a47fa7b14c7d9613909a844aba27f99d3c58634 upstream. Similar to the Surface Go devices, the Elantech touchscreen/digitizer in the Lenovo Yoga C630 mistakenly reports the battery of the stylus, and always reports an empty battery. Apply the HID_BATTERY_QUIRK_IGNORE quirk to ignore this battery and prevent the erroneous low battery warnings. Signed-off-by: Steev Klimaszewski 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 @@ -414,6 +414,7 @@ #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 I2C_DEVICE_ID_LENOVO_YOGA_C630_TOUCHSCREEN 0x279F #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 @@ -383,6 +383,8 @@ static const struct hid_device_id hid_ba HID_BATTERY_QUIRK_IGNORE }, { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_SURFACE_GO2_TOUCHSCREEN), HID_BATTERY_QUIRK_IGNORE }, + { HID_I2C_DEVICE(USB_VENDOR_ID_ELAN, I2C_DEVICE_ID_LENOVO_YOGA_C630_TOUCHSCREEN), + HID_BATTERY_QUIRK_IGNORE }, {} };