From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751483AbdCPJUs (ORCPT ); Thu, 16 Mar 2017 05:20:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32984 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751290AbdCPJUq (ORCPT ); Thu, 16 Mar 2017 05:20:46 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1E5289D4ED Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=benjamin.tissoires@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1E5289D4ED Date: Thu, 16 Mar 2017 10:20:37 +0100 From: Benjamin Tissoires To: Bastien Nocera Cc: Jiri Kosina , Peter Hutterer , Nestor Lopez Casado , Olivier Gay , Simon Wood , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 04/15] HID: logitech-hidpp: battery: remove overloads and provide ONLINE Message-ID: <20170316092037.GM4378@mail.corp.redhat.com> References: <20170202141229.17322-1-benjamin.tissoires@redhat.com> <20170202141229.17322-5-benjamin.tissoires@redhat.com> <1486561733.7723.2.camel@hadess.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1486561733.7723.2.camel@hadess.net> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 16 Mar 2017 09:20:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Feb 08 2017 or thereabouts, Bastien Nocera wrote: > On Thu, 2017-02-02 at 15:12 +0100, Benjamin Tissoires wrote: > > When ONLINE isn't set, upower should ignore the battery capacity, so > > there > > is no need to overload it with some random values. > > In usage, the capacity value will drop to "0": > -(/sys/class/power_supply/hidpp_battery_1)-> cat capacity  > 0 > -(/sys/class/power_supply/hidpp_battery_1)-> cat online  > 1 > Heh, just found out what happened here: we were not checking on the report ID, which means that hitting the 'f' key alone generated a report that was interpreted by hid-logitech-hidpp as a battery event with a null capacity :) Anyway, fixed locally so does the full series that has seen a big clean up. I'll ask Bastien for some tests and will post a v3 soon. Cheers, Benjamin > And GNOME will popup a warning about the device.