AUO-K190x: add runtime-pm calls to controller init functions

A patch from »AUO-K190x: Rotation, truecolor and misc fixes« in state Mainline for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Sun, 24 Jun 2012 13:33:47 +0200

Commit-Message

Patch-Comment

drivers/video/auo_k1900fb.c | 6 ++++++ drivers/video/auo_k1901fb.c | 6 ++++++ 2 files changed, 12 insertions(+), 0 deletions(-)

Statistics

  • 12 lines added
  • 0 lines removed

Changes

------------------------- drivers/video/auo_k1900fb.c --------------------------
index b02fab5d..8cf4847 100644
@@ -60,9 +60,12 @@
static void auok1900_init(struct auok190xfb_par *par)
{
+ struct device *dev = par->info->device;
struct auok190x_board *board = par->board;
u16 init_param = 0;
+ pm_runtime_get_sync(dev);
+
init_param |= AUOK1900_INIT_TEMP_AVERAGE;
init_param |= AUOK1900_INIT_ROTATE(par->rotation);
init_param |= AUOK190X_INIT_INVERSE_WHITE;
@@ -74,6 +77,9 @@ static void auok1900_init(struct auok190xfb_par *par)
/* let the controller finish */
board->wait_for_rdy(par);
+
+ pm_runtime_mark_last_busy(dev);
+ pm_runtime_put_autosuspend(dev);
}
static void auok1900_update_region(struct auok190xfb_par *par, int mode,
------------------------- drivers/video/auo_k1901fb.c --------------------------
index ece99b8..98aa222 100644
@@ -101,9 +101,12 @@
static void auok1901_init(struct auok190xfb_par *par)
{
+ struct device *dev = par->info->device;
struct auok190x_board *board = par->board;
u16 init_param = 0;
+ pm_runtime_get_sync(dev);
+
init_param |= AUOK190X_INIT_INVERSE_WHITE;
init_param |= AUOK190X_INIT_FORMAT0;
init_param |= AUOK1901_INIT_RESOLUTION(par->resolution);
@@ -113,6 +116,9 @@ static void auok1901_init(struct auok190xfb_par *par)
/* let the controller finish */
board->wait_for_rdy(par);
+
+ pm_runtime_mark_last_busy(dev);
+ pm_runtime_put_autosuspend(dev);
}
static void auok1901_update_region(struct auok190xfb_par *par, int mode,
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...