summaryrefslogtreecommitdiff
path: root/drivers/misc/m4sensorhub_pedometer.c
AgeCommit message (Collapse)Author
2014-11-04IKXCLOCK-4107 Add Additional M4 Panic Restore LogicEric Tashakkor
Added user settings recovery to the pedometer driver. Created panic recovery for display and audio statuses. Change-Id: I9520d54d66a7711201d6d17f726afd592365d74a Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-10-14IKXCLOCK-4197: Fix for high daily steps.Viditha Hanumanthareddy
Change-Id: Idb5751c5672d01e02adf13c2f33e25e7d20ce037
2014-10-13IKXCLOCK-4181 Update Pedometer for No RMR CaloriesEric Tashakkor
Added new field for calorie calculations that do not include RMR. Change-Id: I749c2d21535cca2b64d7c15944f09ef164b22927 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-09-26IKXCLOCK-3998 Fix Pedometer Panic RecoveryEric Tashakkor
Fixed a bug where we lose steps on an M4 panic because the current logic works only for interrupt-based reading. Change-Id: I7cde9a57df90565cfed8f5765a2e1c5e09d1fe9f Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-08-10IKXCLOCK-3468 m4sensorhub: Use freezable workqueueJim Wylder
The update of the sensorhub to use polling was based on the belief that the workqueue would be frozen before suspend and thawed afterwards. Unfortunately the system_wq used by schedule_delayed_work, is not freezable. Update the changes to use the system_freezable_wq. Change-Id: Ib759664a5bc61dad72207f59d2c8c672cd0f7c9b Signed-off-by: Jim Wylder <jwylder@motorola.com>
2014-08-08IKXCLOCK-3320: Poll for non wakable sensorsViditha Hanumanthareddy
Bug : 16656953 All sensors were interrupt based, m4 would interrupt omap when the delay timeout occurs, but to be able mask non wakable sensor interrupts on suspend and resume, we r now moving non wakable sensors to be poll based, the kernel starts a timer for each sensor and reads data from m4 on timer expiry. Change-Id: I39f1a94563f3c4c65b586b63018e9e1afebd0d28
2014-07-23IKXCLOCK-3122 Smart Ambient: support ambient off gestureWengang Wu
Change-Id: I22622983c50f1d564f40314f92e49646279826f5
2014-07-22IKXCLOCK-3040 Remove Unnecessary IIO ParametersEric Tashakkor
Removed IIO settings that caused an unused sysfs file to be created, which causes a kernel panic when read. Added a gesture count to the gesture driver to differentiate new gestures. Change-Id: I0e88c88356560c276867388b057ac0a9bb76167e Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-07-21IKXCLOCK-3038 Add Sysfs to Mask Pedometer Data on a ChargerEric Tashakkor
Added a sysfs file to enable/disable pedometer features in M4. This change is intended as a workaround to steps being recorded on a charger. While it needs an M4 change to do something, this change does not require being merged with an M4 binary. Change-Id: Id2ac9d7327a9c42d878ac5e85db450ac5bb65e29 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-07-10IKXCLOCK-2819 Add Mutex Protection to M4 Panic HandlersEric Tashakkor
Added mutex locking in panic restore handlers for all drivers to prevent losing data when restoring after an M4 panic. Added a mutex to the mpu9150 driver to prevent concurrent access issues and loss of data during normal operation. Change-Id: I9ad5595c632518093ad1aec86afc7a51d3cbbee3 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-07-08IKXCLOCK-2713: Retry setrate'sViditha Hanumanthareddy
If i2c communication fails while doing a set sample rate for a sensor retry the same during suspend. It is seems that sometimes omap->M4 i2c bus dies for a brief period and then recovers. But during the failure period if an app tries to turn off a sensor and this turn off fails, it could lead to wakeups after omap suspend, and so this fix retries setting the sample rate on suspend only if it had failed earlier. Change-Id: I5874738a78ed900b1b039160f852031321dd2e30
2014-07-04IKXCLOCK-2752: Send a pedo event for re-registrationViditha Hanumanthareddy
Change-Id: Ic1c98373a4af6d85d13ec44a2afaa60fc171f559
2014-07-02IKXCLOCK-2594: Restore pedometer data after m4 panicViditha Hanumanthareddy
When m4 panics and resets, the total stepcount start from 0, and if an app was registered for pedometer data it would start seeing stepcount restart from 0 when this happens. This fix is to avoid the app from seeing total steps go lower than the previously reported total steps. Change-Id: Ia1c803175e34e582fa132de7ca88e8762e335fe7
2014-05-14IKXCLOCK-1233: Hold a timed wakelock for m4 eventsViditha Hanumanthareddy
A few m4 interrupts/events like gesture, rtc alarm that can occur when kernel is suspended need enough time to allow the event to reach the higher layer before kernel suspends again. The absence of this was causing gestures & rtc alarm to get missed by the higher layers. Change-Id: Ibf10a1a031bd279ef2a488214498036c648220dc
2014-05-12IKXCLOCK-1224 Update M4 Memory Map and DriversEric Tashakkor
Updated M4 memory map based on pending firmware. Updated the heartrate driver to use new M4 names and interrupt. Updated the passive driver to pull new data. Updated the pedometer driver to pull different data and use updated sizes. Fixed an IIO-related bug in the passive driver. Change-Id: I96d6a248fc393dfd5d5b0b8b0a00931e3be7bed9 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-05-07IKXCLOCK-1067 Need User Profile to improve pedometer/calorie accuracy ↵Eric Tashakkor
(Kernel changes) Added "userdata" sysfs interface to handle writing/reading M4 user data. Change-Id: I50c66a96ad4a1f8c060fe886dc20a3dce37a47eb Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-05-01IKXCLOCK-870 Add M4 Fusion DriverEric Tashakkor
Added a separate IIO fusion driver to handle M4 fusion data. Removed duplicate mutex_destroy() calls. Deleted unused pressure sensor header. Change-Id: I2f24a30dbba5b84f590618e3b506d04c92d2a136 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-04-14IKXCLOCK-760: Push a pedometer event on pedometer enableViditha Hanumanthareddy
Change-Id: I455c4e51f9645184f70968442a2431a6b907d847
2014-04-11IKXCLOCK-627 Remove Custom input.h Changes from M4 Drivers.Eric Tashakkor
Converted the gesture driver to IIO and sysfs (see other M4 drivers). Converted the passive driver to IIO and sysfs (see other M4 drivers). Removed fusion data from the mpu9150 driver (needs to be refactored). Removed custom EV_REL and EV_MSC events and restored stock MAX_* values. Updated pedometer and heartrate drivers to match gesture and passive. Updated the ALS driver to init the samplerate to -1 (disabled). Change-Id: I324bd3a4ee0a4bcbb76f36300d51c5b743aa44f9 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-04-02IKXCLOCK-569 Update M4 Pedometer Driver with Sysfs and IIO ReportingEric Tashakkor
Added IIO and sysfs functionality. Removed input.h changes associated with this driver. Backported fixes/updates to heartrate sensor. Fixed error in ALS sensor that would unregister the wrong interrupt. Change-Id: I0983c1119efb7f268f968e0a7fe9dc96192cdc42 Signed-off-by: Eric Tashakkor <w36098@motorola.com>
2014-03-05IKXCLOCK-193:Init mechanism of M4 based driversAmit Jain
Change-Id: I3c665f1c31d14e73d3776982d570c250e6f8c3b1 Reviewed-on: http://gerrit.pcs.mot.com/608745 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Sajid Dalvi <fsd017@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
2014-03-05IKG5-1478: Change m4 kernel modules to be kernel builtinsViditha Hanumanthareddy
Change-Id: I39210cb9b0d0cf75042b5adcfa57da8b800f89a5 Reviewed-on: http://gerrit.pcs.mot.com/588276 SLTApproved: Slta Waiver <sltawvr@motorola.com> Tested-by: Jira Key <jirakey@motorola.com> Reviewed-by: Douglas Zobel <dzobel1@motorola.com> Reviewed-by: Sajid Dalvi <fsd017@motorola.com> Reviewed-by: Jee Su Chang <w20740@motorola.com> Submit-Approved: Jira Key <jirakey@motorola.com>
2014-03-05CW integration and minnow bringupDoug Zobel
* create minnow machine type * create Android makefile * add pre-commit syntax check * enable -Werror * Add drivers: CPCAP, TPS65xxx, m4sensorhub, atmxt, lm3535, usb gadget, minnow display, TI 12xx wireless Change-Id: I7962f5e1256715f2452aed5a62a4f2f2383d5046