remoteproc: add runtime PM autosuspend support
authorFernando Guzman Lugo <fernando.lugo@ti.com>
Thu, 9 Jun 2011 00:06:50 +0000 (19:06 -0500)
committerCris Jansson <cjansson@ti.com>
Sat, 27 Aug 2011 00:04:52 +0000 (19:04 -0500)
commitfd1006300dc301d5c49bb1eda13e05b2047317e1
tree11308dc71624ec901c72bc83d72f483f243459e4
parentaeda2ced8eab1e983fd8f4e62aa8f486736069d5
remoteproc: add runtime PM autosuspend support

Going to suspend and resuming is a heavy task with much latency.  For that
reason remoteproc should go to suspend after some time of inactivity. However,
the remoteproc driver cannot know by itself if activity is being performing on
the remote processor (the driver is only in charge of turning it on/off). That
is why remoteproc adds new APIs to be notified when the remote processor is
used and then restart suspend timeout.

Remote proc users need to use these new APIs. Besides, if they have issues when
the remote processor goes to suspend without their knowledge, they need to
register for suspend/resume notifications. Returning an error in the
notification callback means they are using the remote processor and the
autosuspend should be cancelled.

Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
drivers/remoteproc/Kconfig
drivers/remoteproc/remoteproc.c
include/linux/remoteproc.h