Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-18 Thread Jiri Kosina
On Fri, 8 Jan 2021, Filipe Laíns wrote: > Yeah :head_scratch: > There is a header comment at the start of each feature section, which I think > does a good job pointing this out. IMO the problem with the naming is more for > people who see its usage in other parts of the code, but I guess that is

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-08 Thread Filipe Laíns
On Fri, 2021-01-08 at 15:55 +0100, Jiri Kosina wrote: > On Fri, 8 Jan 2021, Filipe Laíns wrote: > > The problem here is that hidpp20_query_battery_info_1004() does not set > > battery voltage, it is also the battery level. The best alternative Ican > > think > > of is replacing the 1000/1004 with

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-08 Thread Jiri Kosina
On Fri, 8 Jan 2021, Filipe Laíns wrote: > > > -static int hidpp20_query_battery_info(struct hidpp_device *hidpp) > > > +static int hidpp20_query_battery_info_1000(struct hidpp_device *hidpp) > > > > That '_1000' suffix looks strange to me, as it's not completely obvious > > just from looking at

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-08 Thread Filipe Laíns
On Fri, 2021-01-08 at 14:44 +0100, Jiri Kosina wrote: > On Mon, 4 Jan 2021, la...@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

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-08 Thread Jiri Kosina
On Mon, 4 Jan 2021, la...@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 >

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-06 Thread Bastien Nocera
On Wed, 2021-01-06 at 18:48 +, Filipe Laíns wrote: > On Wed, 2021-01-06 at 10:34 +0100, Bastien Nocera wrote: > > On Mon, 2021-01-04 at 18:29 +, la...@archlinux.org wrote: > > > From: Filipe Laíns > > > > > > This new feature present in new devices replaces the old Battery > > > Level >

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-06 Thread Filipe Laíns
On Wed, 2021-01-06 at 10:34 +0100, Bastien Nocera wrote: > On Mon, 2021-01-04 at 18:29 +, la...@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

Re: [PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-06 Thread Bastien Nocera
On Mon, 2021-01-04 at 18:29 +, la...@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

[PATCH] HID: logitech-hidpp: add support for Unified Battery (1004) feature

2021-01-04 Thread lains
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