Commit Graph

8 Commits

Author SHA1 Message Date
Oliver Wang ac87aa0de3 input: sensors: change sensor batching interface
The new Android sensor HAL requires more interfaces to communicate with
sensors driver. Change batching interface to meet the requirements. Sensor
drivers can use the interfaces to provide more features.

Change-Id: I7f3cbdcaa6f5473b038d1cdc07eb34685c1fca23
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-10-22 16:05:26 +08:00
Oliver Wang 7776d50bcf input: sensors: add wake up interface for low power sensor
Add enable_wakeup interface in sensors calss to provide an interface
for user space applications to control the wake up flag. The wake up
flag indicates if the driver works on wake up mode, which means it
can wake up the processor even it is in suspend mode.

Change-Id: I8edf145a190093a4c5384fd948b067b788b1fb1a
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-10-04 11:41:28 +08:00
Daqing Chen 4736122663 input: sensors: add sensors calibrate interface of sensors class
The sensors calibrate interface is a generic interface for sensor
calibrate. Add the interface for user space applications to calibrate
sensors. The interface can send the calibration data to userspace and
also get the calibration data form userspace to driver.

Change-Id: I156e1878f813e8ab0adfb3f2253cdd7fad65e55d
Signed-off-by: Daqing Chen <chendaqing@codeaurora.org>
2014-09-03 13:33:37 +08:00
Bingzhe Cai 316f76162e input: sensors: add batch and flush interface for sensor class
Batch interface allow sensor events reported in batches, flush
interface is used to flush sensor FIFO. These two interface can
save device power by reduce the amount of device wakeup.
Sensor class provide generic interfaces for sensor drivers to access
by sensor HAL, drivers using sensors class should register corresponding
sensor class callback to export their interface.

Change-Id: I1307d731793dbc9a6a2b07de3b1de5188d0d8504
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2014-07-19 11:12:39 +08:00
Oliver Wang c4d842e406 input: sensors: add self test interface for sensors class
The self test interface is a generic interface for sensor self test.
Add the interface for user space applications to test sensors. Drivers
using sensors class should try to implement the callback if needed.

Change-Id: I008198534940c1357cfb1c7c4ff9b9b37beffdee
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2014-05-19 13:12:07 +08:00
Jie Cheng a1c64abeef sensors: add enable and poll_delay APIs for sensor class driver
The sensor class driver will create the "enable" and "poll_delay"
handles in the "/sys/class/sensors/xxx/" for each sensor driver.
The userspace code could easily find the control interface by
searching the "/sys/class/sensors/" folder.

Change-Id: Ia18f062262e4b78db7d7de87acb49dfcf485063b
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-12-23 18:07:29 +08:00
Jie Cheng 39385df274 sensors: Add the sensor handle and type define
Add the sensor handle and type define for the sensor class device
drivers. The define is used for the sensor class device driver
parameters "handle" and "type". By using the define, people could
easily get the "handle" and "type" name.

Change-Id: I3e985a831d428fe3e921b2aecd8018b92d139302
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-11-28 13:33:53 +08:00
Jie Cheng 2423348b7a sensors: add the sensors class support
Add a new sensors sysfs class and put all the sensors device driver
information in this class folder.

Change-Id: I7c35ec4642e4dbd264945ad3839914935b301af0
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-11-21 14:17:24 +08:00