]> git.baikalelectronics.ru Git - kernel.git/commit
stm class: Add runtime power management handling
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>
Tue, 28 Jun 2016 08:35:02 +0000 (11:35 +0300)
committerAlexander Shishkin <alexander.shishkin@linux.intel.com>
Fri, 1 Jul 2016 08:00:14 +0000 (11:00 +0300)
commit5891b64cae150b0042db48a10743ad9cfa662c65
treee98b5e24ba140a035f3e36243a041788dcd83009
parent0491ad2600d2055b3241c61eb7ebbce5f94258a0
stm class: Add runtime power management handling

Currently, there's no runtime pm in stm class devices, which makes it
harder for the underlying hardware drivers to handle their power
management.

This patch applies the following runtime pm policy to stm class devices,
which their parents can rely on for their power management tracking:

  * device is in use during character device writes,
  * delayed autosuspend is used to keep it active between adjacent
  writes,
  * device is in use while mmio regions are mapped,
  * device is is use while any stm_source devices are linked to it.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Chunyan Zhang <zhang.chunyan@linaro.org>
drivers/hwtracing/stm/core.c