Use common hid sensor iio pm functions. Also the poll time read and
wait is part of power up function of hid sensor iio pm function, so
remove from the client drivers.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
This patch removes the .owner field for drivers which use the
platform_driver_register api because this is overriden in
_platform_driver_register.
Signed-off-by: Sanjeev Sharma <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
IIO_CHAN_INFO_SAMP_FREQ and IIO_CHAN_INFO_HYSTERESIS cases ignored
the actual return values (which could be -EINVAL) and instead
returned IIO_VAL_INT_PLUS_MICRO always. Return the actual value
obtained from the functions. Both functions return IIO_VAL_INT_PLUS_MICRO
upon success.
Signed-off-by: Sachin Kamat <[email protected]>
Cc: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Added support for raw reading of channel. If the sensor is powered
off, it will turn on for reading value.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Added an API to allow client drivers to turn ON and OFF sensors for
quick read. Added data_read as counting varaible instead of boolean,
so that sensor is powered off only when last user released it.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Using units and unit exponent to calculate scale which is compliant
to IIO ABI.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
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 <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
We can't store the trigger instance created by iio_trigger_alloc, in
trig field of iio_device structure. This needs to be stored in the
driver private data. Othewise it can result in crash during module
unload. Hence created a trig_ptr in the common data structure
for each HID sensor IIO driver and storing here.
Signed-off-by: Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Now that iio_push_to_buffers() takes a void pointer for the data parameter we
can remove those casts to u8*.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
IIO_VAL_INT_PLUS_MICRO is the default, no need to return it explicitly
Signed-off-by: Peter Meerwald <[email protected]>
Acked-by: srinivas pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Add a MODULE_DEVICE_TABLE in order to let hotplug mechanisms automatically
load the driver.
This makes it also possible to use the usual driver name instead of
HID-SENSOR-2000xx which isn't very descriptive in kernel messages.
Signed-off-by: Alexander Holler <[email protected]>
Acked-by:Srinivas Pandruvada <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
The original driver was pasted from accelerometer driver, but the name
of the ID was not changed. This patch fixes this comment.
Signed-off-by: Alexandre Relange <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
The structure with common attributes for hid-sensors isn't specific
to the iio-subsystem, so rename it to hid_sensor_common.
Signed-off-by: Alexander Holler <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
The stuff in hid-sensor-attributes.h is needed by every piece which
uses hid-sensor-hub and merging it into hid-sensor-hub.h makes it accessible
from outside the iio subdirectory.
Signed-off-by: Alexander Holler <[email protected]>
Acked-by: Jiri Kosina <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
CONFIG_HOTPLUG is going away as an option. As a result, the __dev*
markings need to be removed.
This change removes the use of __devinit, __devexit_p, and __devexit
from these drivers.
Based on patches originally written by Bill Pemberton, but redone by me
in order to handle some of the coding style issues better, by hand.
Cc: Bill Pemberton <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Route all buffer writes through the demux.
Addition or removal of a buffer results in tear down and
setup of all the buffers for a given device.
Signed-off-by: Jonathan Cameron <[email protected]>
Tested-by: srinivas pandruvada <[email protected]>
Drop timestamp parameter from buffer store_to callback and subsequently from
iio_push_to_buffer. The timestamp parameter is unused and it seems likely that
it will stay unused in the future, so it should be safe to remove it.
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Consistently use iio_push_to_buffer instead of manually calling the buffers
store_to callback.
These crossed with Lars-Peter's patch set doing every other case.
Signed-off-by: Jonathan Cameron <[email protected]>
Acked-by: srinivas pandruvada <[email protected]>
Added usage id processing for ALS. 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 <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>