Added usage id processing for device rotation. This uses IIO
interfaces for triggered buffer to present data to user
mode.This uses HID sensor framework for registering callback
events from the sensor hub.
Data is exported to user space in the form of quaternion rotation
format.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Pull HID updates from Jiri Kosina:
- substantial cleanup of the generic and transport layers, in the
direction of an ultimate goal of making struct hid_device completely
transport independent, by Benjamin Tissoires
- cp2112 driver from David Barksdale
- a lot of fixes and new hardware support (Dualshock 4) to hid-sony
driver, by Frank Praznik
- support for Win 8.1 multitouch protocol by Andrew Duggan
- other smaller fixes / device ID additions
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (75 commits)
HID: sony: fix force feedback mismerge
HID: sony: Set the quriks flag for Bluetooth controllers
HID: sony: Fix Sixaxis cable state detection
HID: uhid: Add UHID_CREATE2 + UHID_INPUT2
HID: hyperv: fix _raw_request() prototype
HID: hyperv: Implement a stub raw_request() entry point
HID: hid-sensor-hub: fix sleeping function called from invalid context
HID: multitouch: add support for Win 8.1 multitouch touchpads
HID: remove hid_output_raw_report transport implementations
HID: sony: do not rely on hid_output_raw_report
HID: cp2112: remove the last hid_output_raw_report() call
HID: cp2112: remove various hid_out_raw_report calls
HID: multitouch: add support of other generic collections in hid-mt
HID: multitouch: remove pen special handling
HID: multitouch: remove registered devices with default behavior
HID: hidp: Add a comment that some devices depend on the current behavior of uniq
HID: sony: Prevent duplicate controller connections.
HID: sony: Perform a boundry check on the sixaxis battery level index.
HID: sony: Fix work queue issues
HID: sony: Fix multi-line comment styling
...
Added usage id processing for Pressure Sensor. This uses IIO
interfaces for triggered buffer to present data to user
mode. This uses HID sensor framework for registering callback
events from the sensor hub.
Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Added usage id processing for Proximity (Human Presence).
This uses IIO interfaces for triggered buffer to present data
to user mode. This uses HID sensor framework for registering
callback events from the sensor hub.
Signed-off-by: Archana Patni <archana.patni@intel.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
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.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
New drivers
* HID inclinometer driver.
* DHT11 humidity driver. Note that previous humidity drivers have been in
hwmon, but no one was ever entirely happy with that, and they should find
a more comfortable home in IIO (their original placement in hwmon was my
fault - oops). As this is our first humidity driver, core support is also
added.
New features
* Two of mxs-lradc channels are internally wired to a temperature sensor,
make this explicit in the driver by providing the relevant temperature
channel.
* Add support for blocking IO on buffers.
* Add a data_available call back to the interface between buffer implementations
and the core. This is much cleaner than the old, 'stufftoread' flag.
Implemented in the kfifo buffer.
Cleanups
* Last user of the old event configuration interface is converted and the
old interface dropped. Nice to be rid of this thanks to Lars-Peter's hard
work!
* Replace all remaining instances of the IIO_ST macro with explicit filling
of the scan_type structure within struct iio_chan_spec. This macro was a
bad idea, that rapidly ceased to cover all elements of the structure.
Miss reading of the macro arguements has led to a number of bugs so lets
just get rid of it. The final removal patch is awaiting for some fixes
to make their way into mainline.
In a couple of drivers, no elements of scan_type were even being used so
in those case, it has been dropped entirely.
* Drop a couple of of_match_ptr helper uses in drivers where devicetree is
not optional and hence the structures being protected by this always exist.
* Fix up some cases where data was read from a device in a particular
byte order, but he code placed it into a s16 or similar. These were
highlighted by Sparse.
* Use the new ATTRIBUTE_GROUPS macro to drop some boiler plate in the triggers
core code.
* ad7746 and ad7280a - stop storing buffers on the stack, giving cleaner code
and possibly avoiding issues with i2c bus drivers that assume they can dma
directly into the buffer. Note that this cannot currently happen as the the
i2c_smbus_read_i2c_block_data function has a memcpy from the buffer actually
passed to the bus driver. I missed this element of the commit message
and don't think it is major enough to rebase the iio tree.
* ad5791 and ad5504 stop storing buffers on the stack for an SPI driver.
Unlike the i2c drivers, this is a real issue for SPI drivers which can dma
directly into the buffer supplied.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJStyIbAAoJEFSFNJnE9BaI1goQAL0hKYCYuIl3d1fAy65u2I4h
5mzJs/oJmomq/4BqAopfEQ8CbhZhksAYoR4JndOzZH7n4jVY/fRgyY/bH/Ymj0oI
OpCtfee6IeeBLA0p8CMeEPem/pnwxRhSDzul9jsiwpTrTRKAIC1BPZwrmLpaoUfc
obD8r1ocVZStzfsYBr3DUwkcIpcTQTCVy/Pl8HoKLKKsdYoFhTpNwEHJFOoZdiFi
KKGRkeL9Q8VRWt/otWU0L0VFGZFwI1PWlxrqnbisVcGwSs8FF4wGcQvijfC0mUMg
BdKDM7J4GrourZhj3og566B/8WMtGo6YTJXAe/QvvPp768rQncccDHem4V0Tnu49
OJbjgD4ZGVXt3uBFaYddBIbMEIB8SfA2VYur/MW3gnZ7saSAtDk6TllsvC6CxIkR
+LOOxWylhEGeJFIjyMrFPqRVhrrRNkuDRxPz8ZGTiDc8ovo6DWuTLsJrLSX8EJyZ
O6TN6EEk8TCJaf8V63uTFW0Dlom4IQHyQei6LKhfhzwUQq/ri0esBp5P8lGzI3Uq
wtOSdCDuYyoUEYPYbwjohFmQJ27w1rx9KcS4Y9BGmhTIRXslUg3hr+wA/gKMSDZ0
/AUkLQajcv9otupfGzsp5mIWkthKKsGt/Y50xc5zIodnFtnM3nQGq4AqlP6t8nzP
jucVwVMQLj5KaNH13P6K
=Whfv
-----END PGP SIGNATURE-----
Merge tag 'iio-for-3.14b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next
Jonathan writes:
2nd round of new IIO drivers, features and cleanups for the 3.14 cycle.
New drivers
* HID inclinometer driver.
* DHT11 humidity driver. Note that previous humidity drivers have been in
hwmon, but no one was ever entirely happy with that, and they should find
a more comfortable home in IIO (their original placement in hwmon was my
fault - oops). As this is our first humidity driver, core support is also
added.
New features
* Two of mxs-lradc channels are internally wired to a temperature sensor,
make this explicit in the driver by providing the relevant temperature
channel.
* Add support for blocking IO on buffers.
* Add a data_available call back to the interface between buffer implementations
and the core. This is much cleaner than the old, 'stufftoread' flag.
Implemented in the kfifo buffer.
Cleanups
* Last user of the old event configuration interface is converted and the
old interface dropped. Nice to be rid of this thanks to Lars-Peter's hard
work!
* Replace all remaining instances of the IIO_ST macro with explicit filling
of the scan_type structure within struct iio_chan_spec. This macro was a
bad idea, that rapidly ceased to cover all elements of the structure.
Miss reading of the macro arguements has led to a number of bugs so lets
just get rid of it. The final removal patch is awaiting for some fixes
to make their way into mainline.
In a couple of drivers, no elements of scan_type were even being used so
in those case, it has been dropped entirely.
* Drop a couple of of_match_ptr helper uses in drivers where devicetree is
not optional and hence the structures being protected by this always exist.
* Fix up some cases where data was read from a device in a particular
byte order, but he code placed it into a s16 or similar. These were
highlighted by Sparse.
* Use the new ATTRIBUTE_GROUPS macro to drop some boiler plate in the triggers
core code.
* ad7746 and ad7280a - stop storing buffers on the stack, giving cleaner code
and possibly avoiding issues with i2c bus drivers that assume they can dma
directly into the buffer. Note that this cannot currently happen as the the
i2c_smbus_read_i2c_block_data function has a memcpy from the buffer actually
passed to the bus driver. I missed this element of the commit message
and don't think it is major enough to rebase the iio tree.
* ad5791 and ad5504 stop storing buffers on the stack for an SPI driver.
Unlike the i2c drivers, this is a real issue for SPI drivers which can dma
directly into the buffer supplied.
Added usage id processing for Inclinometer 3D. This uses IIO
interfaces for triggered buffer to present data to user
mode.This uses HID sensor framework for registering callback
events from the sensor hub.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
In the original HID sensor hub firmwares all Named array enums were
to 0-based. But the most recent hub implemented as 1-based,
because of the implementation by one of the major OS vendor.
Using logical minimum for the field as the base of enum. So we add
logical minimum to the selector values before setting those fields.
Some sensor hub FWs already changed logical minimum from 0 to 1
to reflect this and hope every other vendor will follow.
There is no easy way to add a common HID quirk for NAry elements,
even if the standard specifies these field as NAry, the collection
used to describe selectors is still just "logical".
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
magnetometer fields, which is most commonly used in currently available
sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
als fields, which is most commonly used in currently available
sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
gyro fields, which is most commonly used in currently available
sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
A number of Properties that can be applied to Data Fields are per data
field basis or for all data fields. Adding sensitivity field for all
accelerometer fields, which is most commonly used in currently
available sensor hubs.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This patch fixes the style of the comments to be like following
/* The commentary */
There is no functional change.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
These are Usage IDs for the attributes year, month, day,
hour, minute and second, needed to read HID time sensors.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
It should not be necessary to add IDs for HID sensor hubs to lists in
hid-core.c and hid-sensor-hub.c. So instead of a whitelist, autodetect such USB
HID sensor hubs, based on a collection of type physical inside a useage page of
type sensor. If some sensor hubs stil must be usable as raw devices, a
blacklist might be created.
Signed-off-by: Alexander Holler <holler@ahsoftware.de>
Acked-by: "Pandruvada, Srinivas" <srinivas.pandruvada@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Adding processing for HID Sensor usage table as defined by
HID 1.12, Request #: HUTRR39, dated 05 May, 2011.
This driver uses HID driver framework to register, send and
receive events.
This uses MFD framework, so that actual processing for a
specific usage id can be done in a different driver. For
example an accelerometer driver can be a separate driver and
use the interface provided by this driver to register for
events.
Signed-off-by: srinivas pandruvada <srinivas.pandruvada@intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>