Sorry, it is not clear what what does your driver do in the first case
(error).

BTW: why do you need the early suspend at all? Android is not a pure
Linux so you better start from the application level.
The application should disable sensors event listener, Sensor Manager
will call your data_close() and everything will be ok.
I spent quite a lot of time on sensor driver and don't remember any
problems with this approach.

Regards
Igor

On Dec 20, 9:42 pm, Dharam <dharam.kumar.gu...@gmail.com> wrote:
> Hi all,
> I'm trying to have my sensor hardware drivers to go in suspend and
> resume mode(basically, the suspend and resume functions of sensor
> driver)  as the device goes in early suspend(and then complete suspend
> mode) and then wakes up.
> For my use case, if i keep a  "sensor application" say a proximity
> sensor app running and tries to let the device  go in suspend
> mode(early and complete suspend both)
> then I get an error saying :
>
> Restarting tasks ... done.
> suspend: exit suspend, ret = -16 (2000-01-01 03:36:58.558319086 UTC)
> PM: Syncing filesystems ... done.
> Freezing user space processes ...
> Freezing of user space  aborted.
>
> and the device does not go in "complete suspend" mode.
> However, If i use the libraries of <linux/earlysuspend.h> in my driver
> code  and register an instance of early_suspend and and map my suspend/
> resume functions to the structure early_suspend 's  suspend/resume
> functions and register it, the device (with a proximity sensor app
> running) goes in suspend and resume mode without any hassles.
>
> can anyone explain this behavior of sensor drivers?
> -
> Best Regards
> Dharam

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to