From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55FA8C433E0 for ; Wed, 6 Jan 2021 19:18:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C70D2311B for ; Wed, 6 Jan 2021 19:18:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726917AbhAFTSK (ORCPT ); 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