Commit Graph
558 Commits
Author SHA1 Message Date
Jie Cheng 421ff3df74 sensors: Add the class device support for kxtj9 sensor
Add the sensor class device support for the kxtj9 accelerometer
sensor.

Change-Id: I4548c6787f8bc4654c1b3e08d65fa4cb1727bef5
Signed-off-by: Jie Cheng <rockiec@codeaurora.org>
2013-11-28 10:50:48 +08:00
Linux Build Service Account b80cfa0b28 Merge "input: sensors: remove undesired kxtj9 accelerometer power up and access" 2013-11-26 07:57:57 -08:00
Oliver Wang 8d58f6861c input: sensors: remove undesired kxtj9 accelerometer power up and access
The kxtj9 irq handling and enable/disable logic is not correctly
handled. Thus causing the sensor consumes more power.

Change-Id: I114e36c648d9c7e485d77ed5e490c518c93855d3
CRs-fixed: 580419
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-11-26 03:34:50 -08:00
Bingzhe Cai e044dc7b99 input: sensors: calibrate the cm36283 als sensor for 8x10 MTP
The cm36283 als sensor reported inaccurate illumination value
due to not calibrated on 8x10 MTP devices.

CRs-Fixed: 579407
Change-Id: Ie7239f11944579e3d107b3fe739844ceb764998b
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-11-25 01:49:43 -08:00
Bingzhe Cai 3fd4f57749 input: misc: mma8x5x should not read data during suspend
Mma8x5x accelerometer driver continue polling sensor data after
sensor power off, this is because power state flag has been added
into sensor state variable but control condition logic did not
update accordingly.

Change-Id: I4b2ad1a043782d9dea03c5af9a688a0cc4439186
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-11-14 17:19:01 +08:00
Bingzhe Cai 271114e094 input: misc: stk3x1x: turn off device power when sensor is not enabled
Device needs to turn off when both ambient light sensor and
proximity sensor is not enabled, this will maximize power saving.

Change-Id: I3195f180e065c1605029af37da4a65ce30612ac2
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-10-25 17:57:34 +08:00
Bingzhe Cai 70626743f6 input: misc: turn off mma8x5x device power while disabled
Disable device regulators for power saving while device is not in
active state.

CRs-Fixed: 547435
Change-Id: I0984ef75e927d1b8e177782503bb3b2cfa8fa987
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-10-17 15:51:59 +08:00
Oliver Wang d89c81b018 input: sensor: clean up some debugging log
The driver outputs too much logs and affect debugging other issues.
Some more clean up is done in the patch to supress the checkpatch
failures and keep the code style consistency.

Change-Id: I8ad9eeb2e100ab3a6999c895c4e264e689d0702c
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-10-09 23:31:12 -07:00
Linux Build Service Account 80297a4df5 Merge "Sensors: remove the MPU3050 driver parent" 2013-09-23 09:33:00 -07:00
Linux Build Service Account 8cb3ea1262 Merge "input: sensor: add FIR filter for noise filtering" 2013-09-18 12:39:05 -07:00
Linux Build Service Account c5fce3b495 Merge "input: sensor: change name of light sensor device of stk3x1x" 2013-09-18 12:38:47 -07:00
Jie Cheng 912f515087 Sensors: remove the MPU3050 driver parent
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>
2013-09-18 14:38:38 +08:00
Bingzhe Cai ab00b7df59 input: sensor: add FIR filter for noise filtering
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>
2013-09-18 14:12:26 +08:00
Bingzhe Cai 8e6792f982 input: sensor: change name of light sensor device of stk3x1x
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>
2013-09-18 09:43:59 +08:00
Bingzhe Cai be5348a17c input: sensor: increase MMA8x5x idle polling interval
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>
2013-09-18 09:25:52 +08:00
Linux Build Service Account cb6b335a40 Merge "input: sensor: re-arrange the error handling procedure" 2013-09-06 15:01:21 -07:00
Linux Build Service Account 6e748f4f18 Merge "input: sensor: add cm36283 sensor polling support" 2013-09-06 15:01:19 -07:00
Linux Build Service Account d3efbe0be4 Merge "kconfig: add makefile and kconfig for cm36283" 2013-09-06 15:01:14 -07:00
Linux Build Service Account da519a55f6 Merge "input: sensor: add cm36283 devicetree support" 2013-09-06 15:01:12 -07:00
mengmeng 82ee036a6d kconfig: add makefile and kconfig for cm36283
Add Kconfig and makefile to build Capella cm36283 ALPS driver.

Change-Id: I4e217d2b75ec6cf72b5a6534d5736be949534cd5
Signed-off-by: mengmeng <mengmeng@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
(cherry picked from commit b456f357c2406750aedfeb6858e565eb0aad0bfa)
2013-09-05 21:43:44 -07:00
Oliver Wang 0afd6a3fc9 input: sensor: re-arrange the error handling procedure
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>
2013-09-06 12:40:31 +08:00
Oliver Wang ed314dd1b6 input: sensor: add cm36283 sensor polling support
Report cm36283 sensor input event via workqueue.

Change-Id: I9af0f70a8a3c46c23d1cc921015fa1d37b079f6c
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-09-06 12:37:23 +08:00
Oliver Wang 8a1b8be7e4 input: sensor: add cm36283 devicetree support
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>
2013-09-06 11:35:49 +08:00
Linux Build Service Account 320cec13ea Merge "input:sensor: fix unbalanced irq when first enable mpu3050" 2013-09-04 02:54:17 -07:00
Oliver Wang a9be2d2ea8 input: sensor: add power management for cm36283 driver
Add cm36283 proximity and ambient light sensor suspend/resume
support.

Change-Id: Ibbe70955955487386bc190285675fb678c6e875c
Signed-off-by: Oliver Wang <mengmeng@codeaurora.org>
2013-08-28 04:17:02 -07:00
Oliver Wang d13d1927c3 input: sensor: fix cm36283 building error
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>
2013-08-28 03:00:50 -07:00
Oliver Wang 2f4baed0d6 input:sensor: fix unbalanced irq when first enable mpu3050
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>
2013-08-27 16:11:24 -07:00
Oliver Wang 4b325d7817 input: sensor: fix i2c slave not connected issue with mpu3050
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>
2013-08-19 18:41:46 -07:00
mengmeng c36b2f67ad input: senosr: Add regulator control in suspend/resume for mma8x5x
Add the regulator management in sensor suspend/resume function.

Change-Id: Idee8125cee15e62c6f923019d89a8e335618a767
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Signed-off-by: mengmeng <mengmeng@codeaurora.org>
2013-08-13 14:06:09 -07:00
Linux Build Service Account 38b6071457 Merge "input: sensor: Modify filesystem node attribute for HAL access" 2013-07-30 04:23:06 -07:00
Bingzhe Cai 9a15793ab5 input: sensor: Modify filesystem node attribute for HAL access
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>
2013-07-30 09:53:32 +08:00
Linux Build Service Account 8b20c2f38d Merge "input: sensor: add kconfig and makefile entity for stk3x1x driver" 2013-07-29 17:41:34 -07:00
Bingzhe Cai 54a96b1190 input: sensor: add kconfig and makefile entity for stk3x1x driver
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>
2013-07-29 19:29:45 +08:00
Linux Build Service Account 12838c70f4 Merge "input: sensor: Add power init and enable/disable function for stk3x1x" 2013-07-29 04:18:34 -07:00
Linux Build Service Account 273790fb12 Merge "input: sensor: Add device tree support for stk3x1x" 2013-07-29 04:18:33 -07:00
Bingzhe Cai 2b32b50754 input: sensor: Add power init and enable/disable function for stk3x1x
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>
2013-07-28 17:52:30 -07:00
Linux Build Service Account 3f97a543c6 Merge "input: sensor: stk3x1x driver code cleanup" 2013-07-26 12:20:13 -07:00
Bingzhe Cai 1ccffb7d29 input: sensor: Add device tree support for stk3x1x
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>
2013-07-27 02:20:50 +08:00
Linux Build Service Account 0a766475ba Merge "input: sensor: add power control in sensor enable sysfs for mpu3050" 2013-07-25 22:29:29 -07:00
Linux Build Service Account 06048f4fd4 Merge "input: sensor: Add cm36283 light/proximity sensor driver" 2013-07-25 12:26:44 -07:00
Bingzhe Cai 440b835032 input: sensor: stk3x1x driver code cleanup
Minor cleanup, only change those may cause potential problem.

Change-Id: I507135f0a24e831f00dc9217b80cba7f8e069f73
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
2013-07-26 01:02:29 +08:00
zzz b7673aa2f1 input: sensor: add stk3x1x light/proximity sensor driver
Add Sensortek (formerly Sitronix) stk3x1x series ambient light and
proximity 3-in-1 sensor driver.

Change-Id: I88f76c1fdc57869b4113b6c27dcbccff979d78fa
Git-commit: c9f105c3ebba39131a037dd2ad8f81ce0f86e949
Git-repo: https://www.codeaurora.org/cgit/external/thundersoft/ihvjointlab/sensor-driver/
[bingzhec@codeaurora.org: added more detail to commit text]
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Pan Fang <fangpan@codeaurora.org>
2013-07-24 07:24:10 +08:00
Joseph Hsiao 091151d917 input: sensor: Add cm36283 light/proximity sensor driver
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>
2013-07-23 22:56:19 +08:00
Xiaocheng Li b4cc7df591 input: sensor: add power control in sensor enable sysfs for mpu3050
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>
2013-07-17 18:27:50 -07:00
Xiaocheng Li 7c0abb492b input: sensor: Revise the sensor axis data for mma8x5x
Add the input data divider to adjust the sensor axis data.

Change-Id: Id85654d4bcaea956b53d724c782e74f821e47721
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
2013-07-12 15:42:00 -07:00
Linux Build Service Account a6d71bd141 Merge "input: sensor: Add device tree parser for mma8x5x" 2013-07-12 05:22:53 -07:00
Linux Build Service Account 12b964e97f Merge "input:sensor: Add device tree and regulator control support for bmp18x" 2013-07-12 05:21:16 -07:00
Linux Build Service Account 433d1ad887 Merge "input: sensor: msm8610: Fix accelerometer working on wrong mode issue" 2013-07-10 22:16:11 -07:00
Richard Liu 47d071dd8a input:sensor: Add device tree and regulator control support for bmp18x
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>
2013-07-10 14:11:57 -07:00
Figo Wang 2e4586efc3 input: sensor: msm8610: Fix accelerometer working on wrong mode issue
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>
2013-07-10 15:50:30 +08:00