Batching should be disabled after writing 0 to max_latency sysfs
node. Fix it by correct the batching activation logic.
Change-Id: Idbdc883fcbb9d4ad4042512068becf69725f4650
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
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>
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>
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>
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>
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>
table
The following change mistakenly removed a NULL terminator from
the of_match_id table.
commit 2dbb824abd
Author: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Date: Wed Jan 29 17:51:14 2014 -0800
ARM: msm: Clean up sensor ADSP driver; OCMEM is no longer used
Doing so allows for memory corruption when walking the table.
Change-Id: I8ecc29da9c70298b410d21da89fe6d5c8a0322e9
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
Rename sensors ADSP driver to sensors SSC and Move it from
arch/arm/mach-msm to drivers/sensors as drivers/sensors is
the most suitable home for this driver.
Change-Id: I72ae3cfd86157aa2523a4c4d0bf9160f9f2915ae
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
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>
The sensor class device sysfs interface shall be read-only. So
remove the write permisson of these interface.
Change-Id: Ifd763247891f39e2ae7f2ce04f8ffe505c1bebe8
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
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>