remoteproc: add runtime PM autosuspend support
authorFernando Guzman Lugo <fernando.lugo@ti.com>
Thu, 9 Jun 2011 00:06:50 +0000 (19:06 -0500)
committerSubramaniam C.A <subramaniam.ca@ti.com>
Thu, 1 Sep 2011 19:02:07 +0000 (14:02 -0500)
commitddb8afb97570036aa75f8caad28e03e952fb8670
tree48f687520773f13ed4937d7b8bc137f4f54becf7
parentf4f108187bf7ab24f58bdd9adcac9cc1fe1577d8
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