Re: [PATCH] hid-sensor-hub: Force logical minimum to 1 for power and report state

2 messages, 2 authors, 2017-08-09 · open the first message on its own page

Re: [PATCH] hid-sensor-hub: Force logical minimum to 1 for power and report state

From: Jonathan Cameron <hidden>
Date: 2017-08-09 14:34:09

On Tue, 8 Aug 2017 10:26:58 +0200 (CEST)
Jiri Kosina [off-list ref] wrote:
On Sun, 6 Aug 2017, Srinivas Pandruvada wrote:
quoted
In the reference HID sensor hub firmware all Named array enums were
0-based. There is no description of the default base of enums in HID
sensor hub specification as logical minimum should have set this base
value.

Every sensor hub implemented enum as 1-based, without explicitly setting
logical minimum to 1, because of the implementation by one of the major
OS vendor. In Linux we used logical minimum to decide the enum base.

Some sensor hub FWs already changed logical minimum from 0 to 1. We hoped
that every other vendor will follow. But that didn't happen and we had to
fix the report header for every sensor hub to change logical minimum to 1
by using .report_fixup() callback. So for every new sensor hub we had to
modify source code by adding this quirk based on the vendor and device id.
This is becoming a maintenance burden.

This patch hardcodes the logical minimum of power and report state
attributes to 1. In this way we can remove the existing quirks and also
we don't have to add more quirks.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>  
Jonathan, are you ok with me taking this through hid.git? Thanks,
Sure,
Acked-by: Jonathan Cameron <redacted>

Re: [PATCH] hid-sensor-hub: Force logical minimum to 1 for power and report state

From: Jiri Kosina <jikos@kernel.org>
Date: 2017-08-09 20:17:24

On Wed, 9 Aug 2017, Jonathan Cameron wrote:
quoted
Jonathan, are you ok with me taking this through hid.git? Thanks,
Sure,
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Thanks. Applied to for-4.14/ish.

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help