Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp699473pxu; Wed, 6 Jan 2021 01:49:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJx/VcJappEnalCajXzVvPXv8NU4rJWu/CC7fcNVBcH5QuOR5lkdzLsDse6hoZ4DeO6wCHRP X-Received: by 2002:a17:906:9388:: with SMTP id l8mr2327747ejx.22.1609926543025; Wed, 06 Jan 2021 01:49:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609926543; cv=none; d=google.com; s=arc-20160816; b=wBdcyt4g5iInsykdWpOyBud8EG8FgRY/ZOja+acV4pMvtP6MEV8q5Y74WXveM+NhFI CMFAXCxlopGjpaVoL+wttMsubhy9qtpL/Qjwq4gU6VEGVhITpMf5weAlaFN3Vg8RUHcU Y04QHxfVBB1RGS0mV6AUZNZE13ysqtXez9Sq+/nwlCJIEAkAy8Dr1gSAfb3BzkwY5RuK RDsVVSHmVnS3gnIj3in8+6ioBUm8Sz8Mtj8h3bJ7KtJxH4B6byXubx4O0acv34tzb7WX ANwiRYFQ96iDzkw2vU9FtIkL8eg6CmIWckpJuPdDho7XrBqorybH7KK3ednn/lcZfIEF 6gRg== 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=M1qcaee74H6wIFJgw5Px5w55hwJK2UEBPeAGPwQuYWc=; b=Umij5zs9PmfVWsB/CdEUJiY+97CyW12k5JAiSCNtHizK0OsboCw6volg6+ImtavrSZ wNL1dGTTX3ESDJTj0L12mMn1e12W5i53U/ha+1GO5RYmJmaUkUVaxE3DaFfVL10zMg/5 qegAz8zPCMj3NCdNHfEf+o5r/wKYb0YSSlt+hNKY3ib0fzC5kg7XGp7oTYfxEF6Esc44 VjA7QgPRRWwxYgIfuBw6jo8nKVsXhGzCYqgX/RDHHhUI1aUqYu8wI5v9d0GA7LiAKU4J 8ZJeOi5JcikvhV2/5zuc6TIAMmSQ4T0W0xVPULIhIzcpfQ3cjNA3QuGxPNUxi31SGpFZ eRjw== 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 x25si769886edi.388.2021.01.06.01.48.37; Wed, 06 Jan 2021 01:49:03 -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 S1726165AbhAFJqO (ORCPT + 99 others); Wed, 6 Jan 2021 04:46:14 -0500 Received: from mslow2.mail.gandi.net ([217.70.178.242]:37564 "EHLO mslow2.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbhAFJqN (ORCPT ); Wed, 6 Jan 2021 04:46:13 -0500 Received: from relay2-d.mail.gandi.net (unknown [217.70.183.194]) by mslow2.mail.gandi.net (Postfix) with ESMTP id 661A63B25BE for ; Wed, 6 Jan 2021 09:35:45 +0000 (UTC) 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 relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 27C5A4000A; Wed, 6 Jan 2021 09:34:41 +0000 (UTC) Message-ID: <0de99cc89a3cc0cc5b3818e10aefdd2eaddd8032.camel@hadess.net> Subject: Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature From: Bastien Nocera To: lains@archlinux.org, Jiri Kosina , Benjamin Tissoires , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 06 Jan 2021 10:34:41 +0100 In-Reply-To: <20210104182937.1472673-1-lains@archlinux.org> References: <20210104182937.1472673-1-lains@archlinux.org> 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 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