Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1415856rwi; Thu, 27 Oct 2022 15:45:00 -0700 (PDT) X-Google-Smtp-Source: AMsMyM62DG0Fiycj7PomyBCtohxhX6Lp/c9To/aiaC1jJZ/OBTEMs6GGWhHroYHjcj9/05m9aIZ8 X-Received: by 2002:a63:cf48:0:b0:439:7d1c:fedc with SMTP id b8-20020a63cf48000000b004397d1cfedcmr44471961pgj.281.1666910699771; Thu, 27 Oct 2022 15:44:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666910699; cv=none; d=google.com; s=arc-20160816; b=UfcURbffejk0nmRE1mUBY3TvHN1/2WiU72ZeozZ0YOAOp9OLbbJQnGg2k2/H+QylpG hy2LyWMhLKjbpZpqVZKzimSF+Q/N1J5aZP9xiXpSDIbrdURzdEdWjDmsfEavuaVU0OJD HLpq6blOLhcX+NTaz9s7haP0M/rfq97RkB5AXrGprbcEqp/Vy/qpZJP6hi5oBokNhlHE bup5OMQ/fNGm3iOTgnyLpE3q9cQuFx2Y5m4xFJkDmLjsG/5cn4pcKSftwfnU4GkpzL0R SLpcdl+i2QAxP7CF0GtAjAI3TXGyZC6bExcm2gyUf+uStXq8mNdlvLFzJIjSgJ8oqu4J 56mw== 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 :feedback-id:references:in-reply-to:message-id:subject:cc:from:to :dkim-signature:date; bh=y8VadYs6trzDqNdreMr2m0RjqduX0bvbUVP70tUtncI=; b=KKjs9w8kfmTDzYeqJBddeu/rVKy7eon2T9BpFca1vuTR1nw0pKc1bmxUGCE/re3SoA nJiiT6BFhsrNVcm0Yx51JlxFUu0OhbxSGHldJqWK591kK66mPuz9VXP3mOA09OU6vuKX AQbh9vNo+QvCkTOp3KyHNpNKrxcsjAhzt0n9xLyaNtNfC8WW5ZJ5lGluZt/8Y9PaE2Wx J3QCME/tj7A+3mpKW5/oM1tEkkH449vPqZbv18GLb+qjOB6VVg7GvKZKFMvvK2zAVVjA eq4QKOMdbzYsGPAUNR+0Dybf60ul4s4MsjWGZ+NpI+WDI0kriTuo4AkqRKDvkoeqfrh+ 1cYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail3 header.b=VI1qHMFN; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020aa79f0f000000b00546ce9189b1si2852854pfr.65.2022.10.27.15.44.47; Thu, 27 Oct 2022 15:44:59 -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=@protonmail.com header.s=protonmail3 header.b=VI1qHMFN; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236972AbiJ0Vcm (ORCPT + 99 others); Thu, 27 Oct 2022 17:32:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235514AbiJ0Vcj (ORCPT ); Thu, 27 Oct 2022 17:32:39 -0400 Received: from mail-4316.protonmail.ch (mail-4316.protonmail.ch [185.70.43.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 74EC66C126 for ; Thu, 27 Oct 2022 14:32:38 -0700 (PDT) Date: Thu, 27 Oct 2022 21:32:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1666906356; x=1667165556; bh=y8VadYs6trzDqNdreMr2m0RjqduX0bvbUVP70tUtncI=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=VI1qHMFNbMDcQLOps0FfTUHG23xrAgQ+o2A3EC8ncdDsmEcxgBOH1o1bZw3swGQTm G+2dKqsBPJ/8pGyXJA53PX3Jg2FDzAB+TC+91i6Ob6pHX5lLTg5J07q8IjYLP2dUv2 xYiMY+OTwVYc0/qS6r0OGtyrY7zn4p9oEglaP+FS7couaVKwvmZVG9WpqscIeqxWnZ D61RhQlWmXKmMUsAwVMQVKDDJLL4JASi+GQFYQWMWZvwbPF8l8F6AEvThHZDkIhq+f 9d0D2AL8uYqn0RdaQq/QrnP/bbw98K9Zp2uBEbYJ0unS/2q1FJVNCv43H36Q8Zpbfg 6yhXopvIpWAmQ== To: =?utf-8?Q?Jos=C3=A9_Exp=C3=B3sito?= From: =?utf-8?Q?Barnab=C3=A1s_P=C5=91cze?= Cc: jikos@kernel.org, benjamin.tissoires@redhat.com, spbnick@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Mia Kanashi , Andreas Grosse Subject: Re: [PATCH] HID: uclogic: Add support for XP-PEN Deco LW Message-ID: <2m7M7XFEGHGOu6Le-GK_9kDuuA3BltmE1I17zDsok382TFmgO2oDamLv7cWcXjYLdzdgwQli7Qe98xoe0tuVc4bg7sRbFG2LFZ6iYn0s3Fk=@protonmail.com> In-Reply-To: <20221027211021.230325-1-jose.exposito89@gmail.com> References: <20221027211021.230325-1-jose.exposito89@gmail.com> Feedback-ID: 20568564:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,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 Hi 2022. okt=C3=B3ber 27., cs=C3=BCt=C3=B6rt=C3=B6k 23:10 keltez=C3=A9ssel, Jo= s=C3=A9 Exp=C3=B3sito =C3=ADrta: > [...] > +/** > + * uclogic_params_ugee_v2_has_battery() - check whether a UGEE v2 device= has > + * battery or not. > + * @hdev:=09The HID device of the tablet interface. > + * > + * Returns: > + *=09True if the device has battery, false otherwise. > + */ > +static bool uclogic_params_ugee_v2_has_battery(struct hid_device *hdev) > +{ > +=09/* The XP-PEN Deco LW vendor, product and version are identical to th= e > +=09 * Deco L. The only difference reported by their firmware is the prod= uct > +=09 * name. Add a quirk to support battery reporting on the wireless > +=09 * version. > +=09 */ > +=09if (hdev->vendor =3D=3D USB_VENDOR_ID_UGEE && > +=09 hdev->product =3D=3D USB_DEVICE_ID_UGEE_XPPEN_TABLET_DECO_L) { > +=09=09struct usb_device *udev =3D hid_to_usb_dev(hdev); > +=09=09const char *lw_name =3D "Deco LW"; > + > +=09=09if (strncmp(udev->product, lw_name, strlen(lw_name)) =3D=3D 0) Please use `strstarts()` here instead. > +=09=09=09return true; > +=09} > + > +=09return false; > +} > [...] Regards, Barnab=C3=A1s P=C5=91cze