linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Introduce PM runtime helper functions
@ 2015-05-18 16:25 Daniel Baluta
  2015-05-18 16:25 ` [RFC PATCH 1/2] iio: pm_runtime: " Daniel Baluta
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Daniel Baluta @ 2015-05-18 16:25 UTC (permalink / raw)
  To: jic23, srinivas.pandruvada
  Cc: knaack.h, lars, pmeerw, daniel.baluta, linux-iio, linux-kernel

Working on a new driver I noticed that there is a fair amount of duplicate
code for adding PM runtime support.

First patch refactors the PM runtime support in a new header
 <linux/iio/pm_runtime> introducing functions for setup/cleanup and
set power state.

Second patch modifies the KXCJK-1013 driver to use the newly created API. If
this is ok follow up patches will modify the rest of the drivers.

There is a small difference for hid-sensors where the setup sequence additionally
calls pm_suspend_ignore_children. This is taken care of by introducing a 3rd
parameter to iio_pm_runtime_setup.

Daniel Baluta (2):
  iio: pm_runtime: Introduce PM runtime helper functions
  iio: accel: kxcjk1013: Use the new IIO pm runtime helpers

 drivers/iio/accel/kxcjk-1013.c | 56 ++++++++++---------------------------
 include/linux/iio/pm_runtime.h | 63 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+), 42 deletions(-)
 create mode 100644 include/linux/iio/pm_runtime.h

-- 
1.9.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-05-18 18:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-18 16:25 [RFC PATCH 0/2] Introduce PM runtime helper functions Daniel Baluta
2015-05-18 16:25 ` [RFC PATCH 1/2] iio: pm_runtime: " Daniel Baluta
2015-05-18 17:34   ` Peter Meerwald
2015-05-18 18:24     ` Daniel Baluta
2015-05-18 16:25 ` [RFC PATCH 2/2] iio: accel: kxcjk1013: Use the new IIO pm runtime helpers Daniel Baluta
2015-05-18 16:54 ` [RFC PATCH 0/2] Introduce PM runtime helper functions Lars-Peter Clausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).