• Srinivas Pandruvada's avatar
    HID: hid-sensor-hub: Add selector api · e02cee48
    Srinivas Pandruvada authored
    In some report descriptors, they leave holes in the selectors. In
    this case if we use hardcoded selector values, this will result
    in invalid values. For example, if there is selectors defined for
    Power State from OFF to D0 to D3. We can't use indexes of these states
    if some states are not implemented or not present in the report decriptors.
    In this case, we need to get the indexes from report descriptors.
    
    One API is added to get the index of a selector. This API will
    search for usage id in the field usage list and return the index.
    Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    e02cee48
hid-sensor-hub.c 19.5 KB