From: Heiko Stübner Date: Fri, 22 Mar 2013 14:13:37 +0000 (+0100) Subject: AUO-K190x: add runtime-pm calls to controller init functions X-Git-Tag: v3.10-rc1~197^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70f1e28e65dec704cd49bf7e21c2c372096cf5b3;p=profile%2Fivi%2Fkernel-x86-ivi.git AUO-K190x: add runtime-pm calls to controller init functions The controller init may be called from a context where the device is runtime suspended, leading to a deadlock, as the controllers only accepts the wakeup command when suspended. Signed-off-by: Heiko Stübner Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/video/auo_k1900fb.c b/drivers/video/auo_k1900fb.c index d572d3e..f5b668e 100644 --- a/drivers/video/auo_k1900fb.c +++ b/drivers/video/auo_k1900fb.c @@ -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, diff --git a/drivers/video/auo_k1901fb.c b/drivers/video/auo_k1901fb.c index 9efbe27..12b9adc 100644 --- a/drivers/video/auo_k1901fb.c +++ b/drivers/video/auo_k1901fb.c @@ -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,