diff options
author | Heiko Stübner <heiko@sntech.de> | 2013-03-22 10:13:37 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-04 06:08:06 -0400 |
commit | 70f1e28e65dec704cd49bf7e21c2c372096cf5b3 (patch) | |
tree | 1fefaac9ed8d2e8fe0ccd91b727c237017dd240d | |
parent | a1655100ddfa10829b7d3b055611f268a82e335a (diff) |
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 <heiko@sntech.de>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/auo_k1900fb.c | 6 | ||||
-rw-r--r-- | drivers/video/auo_k1901fb.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/auo_k1900fb.c b/drivers/video/auo_k1900fb.c index d572d3e9c502..f5b668e77af3 100644 --- a/drivers/video/auo_k1900fb.c +++ b/drivers/video/auo_k1900fb.c | |||
@@ -60,9 +60,12 @@ | |||
60 | 60 | ||
61 | static void auok1900_init(struct auok190xfb_par *par) | 61 | static void auok1900_init(struct auok190xfb_par *par) |
62 | { | 62 | { |
63 | struct device *dev = par->info->device; | ||
63 | struct auok190x_board *board = par->board; | 64 | struct auok190x_board *board = par->board; |
64 | u16 init_param = 0; | 65 | u16 init_param = 0; |
65 | 66 | ||
67 | pm_runtime_get_sync(dev); | ||
68 | |||
66 | init_param |= AUOK1900_INIT_TEMP_AVERAGE; | 69 | init_param |= AUOK1900_INIT_TEMP_AVERAGE; |
67 | init_param |= AUOK1900_INIT_ROTATE(par->rotation); | 70 | init_param |= AUOK1900_INIT_ROTATE(par->rotation); |
68 | init_param |= AUOK190X_INIT_INVERSE_WHITE; | 71 | init_param |= AUOK190X_INIT_INVERSE_WHITE; |
@@ -74,6 +77,9 @@ static void auok1900_init(struct auok190xfb_par *par) | |||
74 | 77 | ||
75 | /* let the controller finish */ | 78 | /* let the controller finish */ |
76 | board->wait_for_rdy(par); | 79 | board->wait_for_rdy(par); |
80 | |||
81 | pm_runtime_mark_last_busy(dev); | ||
82 | pm_runtime_put_autosuspend(dev); | ||
77 | } | 83 | } |
78 | 84 | ||
79 | static void auok1900_update_region(struct auok190xfb_par *par, int mode, | 85 | 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 9efbe2763447..12b9adcb75c5 100644 --- a/drivers/video/auo_k1901fb.c +++ b/drivers/video/auo_k1901fb.c | |||
@@ -101,9 +101,12 @@ | |||
101 | 101 | ||
102 | static void auok1901_init(struct auok190xfb_par *par) | 102 | static void auok1901_init(struct auok190xfb_par *par) |
103 | { | 103 | { |
104 | struct device *dev = par->info->device; | ||
104 | struct auok190x_board *board = par->board; | 105 | struct auok190x_board *board = par->board; |
105 | u16 init_param = 0; | 106 | u16 init_param = 0; |
106 | 107 | ||
108 | pm_runtime_get_sync(dev); | ||
109 | |||
107 | init_param |= AUOK190X_INIT_INVERSE_WHITE; | 110 | init_param |= AUOK190X_INIT_INVERSE_WHITE; |
108 | init_param |= AUOK190X_INIT_FORMAT0; | 111 | init_param |= AUOK190X_INIT_FORMAT0; |
109 | init_param |= AUOK1901_INIT_RESOLUTION(par->resolution); | 112 | init_param |= AUOK1901_INIT_RESOLUTION(par->resolution); |
@@ -113,6 +116,9 @@ static void auok1901_init(struct auok190xfb_par *par) | |||
113 | 116 | ||
114 | /* let the controller finish */ | 117 | /* let the controller finish */ |
115 | board->wait_for_rdy(par); | 118 | board->wait_for_rdy(par); |
119 | |||
120 | pm_runtime_mark_last_busy(dev); | ||
121 | pm_runtime_put_autosuspend(dev); | ||
116 | } | 122 | } |
117 | 123 | ||
118 | static void auok1901_update_region(struct auok190xfb_par *par, int mode, | 124 | static void auok1901_update_region(struct auok190xfb_par *par, int mode, |