linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Hutterer <peter.hutterer@who-t.net>
To: Bastien Nocera <hadess@hadess.net>
Cc: Jiri Kosina <jikos@kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	Nestor Lopez Casado <nlopezcasad@logitech.com>
Subject: Re: [PATCH 1/2] HID: logitech-hidpp: add battery support for HID++ 2.0 devices
Date: Fri, 8 Jul 2016 14:34:15 +1000	[thread overview]
Message-ID: <20160708043415.GA3691@jelly> (raw)
In-Reply-To: <1467933668.25410.3.camel@hadess.net>

On Fri, Jul 08, 2016 at 01:21:08AM +0200, Bastien Nocera wrote:
> On Wed, 2016-06-29 at 19:28 +1000, Peter Hutterer wrote:
> > If the 0x1000 Unified Battery Level Status feature exists, expose the
> > battery
> > level.
> > 
> > The main drawback is that while a device is plugged in its battery
> > level is 0.
> > To avoid exposing that as 0% charge we make up a number based on the
> > charging
> > status.
> 
> This will require changes in UPower, so that it doesn't try to access
> the Logitech unifying devices via user-space, and uses the data from
> the kernel. Did you already file a bug?

filed now: https://bugs.freedesktop.org/show_bug.cgi?id=96857

> Note that this would also mean losing the "lux" information, but I
> don't think that's something we're that interested in exposing.

Adding that HID++ request to the kernel would be easy enough but I don't 
see anything in the power_supply_property that would match this, do you? 
Also, I don't have such a device so testing would be tricky.

Cheers,
   Peter


> 
> For example, for a keyboard that recharges via solar panels, at night:
> 
> Device: /org/freedesktop/UPower/devices/keyboard_0003o046Do4002x0004
>   native-path:          /sys/devices/pci0000:00/0000:00:14.0/usb3/3-10/3-10:1.2/0003:046D:C52B.0003/0003:046D:4002.0004
>   vendor:               Logitech, Inc.
>   model:                K750
>   serial:               197F3F23
>   power supply:         no
>   updated:              Fri 08 Jul 2016 01:17:40 CEST (95 seconds ago)
>   has history:          yes
>   has statistics:       no
>   keyboard
>     present:             yes
>     rechargeable:        yes
>     state:               discharging
>     warning-level:       none
>     luminosity:          16 lx
>     percentage:          89%
>     icon-name:          'battery-full-symbolic'
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-07-08  4:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  9:28 [PATCH 1/2] HID: logitech-hidpp: add battery support for HID++ 2.0 devices Peter Hutterer
2016-06-29  9:28 ` [PATCH 2/2] HID: logitech-hidpp: remove HIDPP_QUIRK_CONNECT_EVENTS Peter Hutterer
2016-07-07  9:34 ` [PATCH 1/2] HID: logitech-hidpp: add battery support for HID++ 2.0 devices Jiri Kosina
2016-07-07 23:21 ` Bastien Nocera
2016-07-08  4:34   ` Peter Hutterer [this message]
2016-07-08 14:35 ` Bastien Nocera
2016-07-08 17:38   ` Bastien Nocera
2016-07-08 18:24     ` Jiri Kosina
2016-07-11 11:18       ` Benjamin Tissoires
2016-07-11 11:33         ` Jiri Kosina
2016-07-11 11:03     ` Benjamin Tissoires
2016-07-11 10:54   ` Benjamin Tissoires
2016-07-13  5:18   ` Peter Hutterer
2017-01-26 15:02 ` Bastien Nocera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160708043415.GA3691@jelly \
    --to=peter.hutterer@who-t.net \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hadess@hadess.net \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nlopezcasad@logitech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).