Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1067106pxu; Wed, 6 Jan 2021 11:20:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqCpIC+7fY6ta7FPa2zpoKH1DLzAkwYlxeIL4Ew/hwQECaO30zurgDJiZszjvTjijyP/vG X-Received: by 2002:aa7:d297:: with SMTP id w23mr4960694edq.374.1609960817505; Wed, 06 Jan 2021 11:20:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609960817; cv=none; d=google.com; s=arc-20160816; b=C5NMuTKVdxWubLL4ajpvnpPui1jHsnt8vX1dpVijTQFRqfwJSqfJNViPXgwhE7VjAc rEFxpy1uVrLAWTTFKlY0vx0EaN7cBBkHCmRptSq9EAdWDPnwXctd3Uhf+ST1e9NnSrtn Wl7Ld6lmVWzBZafjy+xZMKqmnoFa+BoYkBveovKKArpf7fhInPMzCibyVMEytjQWJF89 Mu2NbtJbV8SmoBazHBizrYScbvh3Ya1cdAK68YbSL0DU4PYxgoIPqA674p3NpfcvcjdQ +Kdkz8Pur/ja2fk3Ieu5oNr0V+qi6pUBTYdWPbCg88Twa6vvGUvr9UciuysT5JPQJT3I U8Rw== 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:date:to:from:subject:message-id; bh=TIANiFIk+t/UjlMgY6ggAOzXpjw/8XFxIzyFC3Ovko4=; b=vMqw7W/ullLCBN8QXAMxLaqKrrNDKyTYttpJMNcEcYUDhGh50QeJtB49jBmk5sheA5 vrvQoZJXO4HgUPdvvWGzQx/7XQQxVM+yFgkE9AV88yMa4ZmoJpscRn1Jc2AaPF9fK/6S dC16H2OCxxzYly6bsweKaMRoDFw4moDHbSp1NADyK1AsIVHcn/LgoAl6nFqPEl4Zs39+ GExrrP+mcBbfkzP5W3miDxjGNM1P1b6luevfgKxwVo6n0IbGJY1mfvNZtEhwy5VMm4hJ u7wtJaRjmj/y5BsMRSL2GpUT5vG3ShGj6Pc+kFb0p5cHdSZqM9/qfNrHfa4reoNNY4m7 ubSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r14si1198713eju.173.2021.01.06.11.19.53; Wed, 06 Jan 2021 11:20:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726865AbhAFTSK (ORCPT + 99 others); Wed, 6 Jan 2021 14:18:10 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:34179 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726840AbhAFTSJ (ORCPT ); Wed, 6 Jan 2021 14:18:09 -0500 X-Greylist: delayed 34965 seconds by postgrey-1.27 at vger.kernel.org; Wed, 06 Jan 2021 14:18:09 EST X-Originating-IP: 82.255.60.242 Received: from [192.168.1.150] (lns-bzn-39-82-255-60-242.adsl.proxad.net [82.255.60.242]) (Authenticated sender: hadess@hadess.net) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 05C27C0006; Wed, 6 Jan 2021 19:17:26 +0000 (UTC) Message-ID: <6b33f956dfffc8edcff72f66a29ccf5d86682a53.camel@hadess.net> Subject: Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature From: Bastien Nocera To: Filipe =?ISO-8859-1?Q?La=EDns?= , Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 06 Jan 2021 20:17:26 +0100 In-Reply-To: References: <20210104182937.1472673-1-lains@archlinux.org> <0de99cc89a3cc0cc5b3818e10aefdd2eaddd8032.camel@hadess.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.2 (3.38.2-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2021-01-06 at 18:48 +0000, Filipe Laíns wrote: > On Wed, 2021-01-06 at 10:34 +0100, Bastien Nocera wrote: > > On Mon, 2021-01-04 at 18:29 +0000, lains@archlinux.org wrote: > > > From: Filipe Laíns > > > > > > This new feature present in new devices replaces the old Battery > > > Level > > > Status (0x1000) feature. It keeps essentially the same > > > information > > > for > > > levels (reporting critical, low, good and full) but makes these > > > levels > > > optional, the device exports a capability setting which describes > > > which > > > levels it supports. In addition to this, there is an optional > > > state_of_charge paramenter that exports the battery percentage. > > > > > > This patch adds support for this new feature. There were some > > > implementation choices, as described below and in the code. > > > > > > If the device supports the state_of_charge parameter, we will > > > just > > > export the battery percentage and not the levels, which the > > > device > > > might > > > still support. > > > > I'm guessing that means no changes needed on the upower side? > > > > Cheers > > > > Yes :) > I tested upower and all works as expected. > > There will still be devices that only support battery voltage, so I > might > implement the battery voltage to charge percentage in a future patch. I sent a WIP patch at the end of November for that, it wasn't even compile-tested, but might be a good base to start from. I don't think that I have any hardware that supports that feature in any case. Cheers