diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2014-01-31 12:04:10 -0800 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-02-17 17:12:47 +0100 |
commit | ca2ed12f163bf430a425ec725ef76df5254b9f45 (patch) | |
tree | 06fbeca9113d06fccb6bebad133e460facacee38 /drivers/xen/mcelog.c | |
parent | 1a214ae5d1a66ead18c5e8c3a8d03b969b0ee647 (diff) | |
download | linux-ca2ed12f163bf430a425ec725ef76df5254b9f45.tar.bz2 |
HID: hid-sensor-hub: Processing for duplicate physical ids
In HID sensor hub, HID physical ids are used to represent different sensors.
For example physical id of 0x73 in usage page = 0x20, represents an
accelerometer. The HID sensor hub driver uses this physical ids to create
platform devices using MFD. There is 1:1 correspondence between an phy id and a
client driver.
But in some cases these physical ids are reused. There is a phy id 0xe1, which
specifies a custom sensor, which can exist multiple times to represent various
custom sensors. In this case there can be multiple instances of client MFD
drivers, processing specific custom sensor. In this case when client driver
looks for report id or a field index, it should still get the report id
specific to its own type. This is also true for reports, they should be
directed towards correct instance. This change introduce a way to parse and
tie physical devices to their correct instance.
Summary of changes:
- To get physical ids, use collections. If a collection of type=physical
exist then use usage id as in the name of platform device name
- As part of the platform data, we assign a hdsev instance, which has
start and end of collection indexes. Using these indexes attributes
can be tied to correct MFD client instances
- When a report is received, call callback with correct hsdev instance.
In this way using its private data stored as part of its registry, it
can distinguish different sensors even when they have same physical and
logical ids.
This patch is co-authored with Archana Patni <archna.patni@intel.com>.
Reported-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/xen/mcelog.c')
0 files changed, 0 insertions, 0 deletions