Remove the MPU3040 gyroscope driver parent to allow the system
registers the driver in the "/sys/devices/virtual/input" folder.
The system will give the driver sysfs interface correct permission
according to the ueventd file.
CRs-Fixed: 510210
Change-Id: I957acc809005a06f6a8219140d8a4d609e46b435
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
Add FIR filter to process light sensor data of stk3x1x ALPS. This
filter is used to suppress data jitter which is caused by power
supply noise.
CRs-Fixed: 524706
Change-Id: Ic3a33621dffc69f198f0389efcb82aa0963efd97
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Change name of light sensor device that sensor HAL can distinguish
the device with other devices. Sensor HAL needs to distinguish different
devices because device drivers may use different sysfs interfaces and
may report different formats of data.
CRs-Fixed 524706
Change-Id: I3d2d31ef12c30abb9d884eda5b1248160aa2aceb
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Increase idle state polling interval for MMA8x5x to reduce power
consumption caused by idle polling.
CRs-Fixed: 542388
Change-Id: Id1e2c319e1310abfdf7d9ecd416c94c63d0e1768
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
The error handling routine in the previous code may cause
NULL pointer failure if probing error. Fix the issue by
re-arranging the error handling procedure.
Change-Id: I3529e00ccb92160011a622644bc10bedceda1c86
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Report cm36283 sensor input event via workqueue.
Change-Id: I9af0f70a8a3c46c23d1cc921015fa1d37b079f6c
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Add Capella cm36283 ambient light/proximity sensor devicetree support
to make it compatible with the current Linux kernel structure.
Change-Id: I23d7916480d1924b4a0a8121b2a587993a1d4b61
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Add cm36283 proximity and ambient light sensor suspend/resume
support.
Change-Id: Ibbe70955955487386bc190285675fb678c6e875c
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Fix cm36283 driver building error, which is caused by not compatible with
the current kernel source code.
Change-Id: If383201fac55f4fb701b869be0b3a6164f4d3ba4
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
The irq should be disabled after request_irq to avoid unbalanced irq.
Change-Id: Ic33c9061599a851072febac1bcc374b232644779
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Signed-off-by: Mallesh Koujalagi <malles@codeaurora.org>
The irq interrupt and i2c transfer should only happen when
the device boots up.
CRs-fixed: 519828
Change-Id: I28ec1d79e13b11137e2c009b5dcae765161ee9aa
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Sensor HAL library control sensors by read/write certain filesystem
node. So we need to change the attribute of these filesystem node
in sensor driver that HAL layer can access them.
Change-Id: I7fc9f93ace78755e913e42145b88cd84de236584
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Pan Fang <fangpan@codeaurora.org>
Kconfig and makefile entity is required to build Sitronix stk3x1x
light/proximity sensor driver.
Change-Id: I8a64d6b11ef7bae72af09744346ab90b762e1c33
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Power control function is required to request regulator and
configure supply voltage for device.
Power enable/disable function will be called to turn ON/OFF device
power supply.
Change-Id: Ie5dd587fdee06b2dbdf15941468838c4f46933c2
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Add device tree parser and binding document for Sensortek stk3x1x
series ambient light/proximity sensor.
Change-Id: I8e553da2856ecd42629a409347659e71dcdd8f2f
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Minor cleanup, only change those may cause potential problem.
Change-Id: I507135f0a24e831f00dc9217b80cba7f8e069f73
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
First version of Capella cm36283 ambient light/proximity sensor
driver which is provided by sensor vendor.
Change-Id: I4cf7dcb13e763e0b0236d3ee952fac5f9093640d
Signed-off-by: Joseph Hsiao <joseph.cy.hsiao@gmail.com>
Git-commit: 708b4ce7b1dd451f44a9981cbd58f4bca5aa9e5e
Git-repo: https://github.com/josephhsiao/capellamicro
[lix@codeaurora.org: Solve trivial compiling issue.]
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
[bingzhec@codeaurora.org: add more detail to commit text]
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Add the sensor power management in the enable sysfs interface,
through which the HAL layer could enable/disable the sensor.
Change-Id: I68d77a5085e2d80deedb273f0ff1e0d5664ba71c
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Add the input data divider to adjust the sensor axis data.
Change-Id: Id85654d4bcaea956b53d724c782e74f821e47721
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Add devicetree support in the bmp180 driver to parse and handle
the sensor device configuration information from DT. The regulator
config function is added to control the bmp180 vdd and vlogic
power.
Change-Id: Ia5bbe016b428ff5c75c6bc43a29fa937ed1e7ef7
Signed-off-by: Richard Liu <richardl@codeaurora.org>
Accelerometer Kionix kxtj9 always outputs 8-bit data because assign
a boolean value to bit mask variable. This patch will fix this and
also change the resolution control variable name from "res_12bit"
to "res_ctl" to avoid misleading.
Change-Id: I4784bfb18679a1a64941eafc80762241cdd825fe
Signed-off-by: Figo Wang <figow@codeaurora.org>
Add device tree parser to allow Freescale accelerometer driver can
get interrupt and position configuration from device tree.
Change-Id: I1467a72977414264715b30dd5c26f2aaf5a1f7ae
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Add regulator config function to control the vdd and vlogic
power for the device. The device tree match table for sensor
mma8x5x is added to keep compatible with the sensor node in DT.
Change-Id: I18e54c7479af24df9cb3482ba8f72384cfcb5f29
Signed-off-by: Richard Liu <richardl@codeaurora.org>
If set EV_ABS bit to evbit, and also set ABS_MISC
bit absbit, kernel will treat it as vitual input
device, it has the file node like "/sys/devices/
virtual/input/inputx/", besides "/sys/class/input/
inputx/". The uevent scripts will set the group of
all "enable" files in "/sys/devices/virtual/input/
inputx*" as "input" group, so that the sensor HAL
which group is "input", can write the "enable" file
to control the sensor
Change-Id: I4ceda923d7f236b8ceebaaa36cfd72abf4fa7e10
Signed-off-by: Richard Liu <richardl@codeaurora.org>
The enable sysfs interface is needed for sensor HAL layer to
enable/disable the device.
Change-Id: I378c283387cde2f14868693480b89cd0d7506ce7
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Add device tree support in mpu3050 driver to parse and handle
sensor device configuration from DT. 'enable_gpio' is added as
the switch control for sensor vlogic power.
Change-Id: I45b5c0bf791d96646cd9ecfe4ac1038da97262e2
Signed-off-by: Richard Liu <richardl@codeaurora.org>