OSDN Git Service

FOR_UPSTREAM: iio: hid-sensor-hub: Remove hard coded indexes
authorArchana <archana.patni@linux.intel.com>
Fri, 31 Jan 2014 11:42:34 +0000 (06:42 -0500)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 18 Mar 2014 01:49:30 +0000 (09:49 +0800)
commitc04179db0e66736e97f8dd2c46f2ebf3b49311ae
treefc967992e3c829843d68b338fbc3428d946488fc
parent3f3add41eecbd95f8f05f93baebf668b2165ef03
FOR_UPSTREAM: iio: hid-sensor-hub: Remove hard coded indexes

Remove the hard coded indexes, instead search for usage id and
use the index to set the power and report state. This will fix
issue, where the report descriptor doesn't contain the full
list of possible selector for power and report state.

For: AIAF-4024

Change-Id: I35a92f2d9766fc612f7ab9f9bed1152e7d6e14bd
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Reviewed-on: https://android.intel.com/160118
Reviewed-by: Patni, Archana <archana.patni@intel.com>
Tested-by: Patni, Archana <archana.patni@intel.com>
Reviewed-by: Sesha, Subramony <subramony.sesha@intel.com>
Reviewed-by: Nordell, Joakim <joakim.nordell@intel.com>
Tested-by: sys_abtbuild <sys_abtbuild@intel.com>
Reviewed-by: Odeberg, Hans <hans.odeberg@intel.com>
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
include/linux/hid-sensor-ids.h