diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2008-01-01 19:09:54 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-28 08:13:25 -0500 |
commit | ca4d6cfcee0cb2d25c0eb3b0172ecc6f223133ef (patch) | |
tree | 5bfcb4419f27b20782b76b81ae7f341bcd507e1b /drivers/input | |
parent | 2e927b76267a57a44c018ffcc64cde5fedde1fcf (diff) |
[ARM] 4737/1: Refactor corgi_lcd to improve readability + bugfix
This patch refactors the code in corgi_lcd.c moving it to the board
specific corgi and spitz files where appropriate instead of the
existing ifdef mess which hinders readability.
Fix spitz_get_hsync_len() to call get_hsync_invperiod so pxafb can be
compiled as a module.
The confusing variables which represent the inverse horizintal sync
period are renamed to "invperiod" consistently.
An incorrect comment in corgi_ts.c is also corrected.
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/touchscreen/corgi_ts.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c index b1b2e07bf080..99d92f5c93d6 100644 --- a/drivers/input/touchscreen/corgi_ts.c +++ b/drivers/input/touchscreen/corgi_ts.c | |||
@@ -74,10 +74,10 @@ extern unsigned int get_clk_frequency_khz(int info); | |||
74 | 74 | ||
75 | static unsigned long calc_waittime(struct corgi_ts *corgi_ts) | 75 | static unsigned long calc_waittime(struct corgi_ts *corgi_ts) |
76 | { | 76 | { |
77 | unsigned long hsync_len = corgi_ts->machinfo->get_hsync_len(); | 77 | unsigned long hsync_invperiod = corgi_ts->machinfo->get_hsync_invperiod(); |
78 | 78 | ||
79 | if (hsync_len) | 79 | if (hsync_invperiod) |
80 | return get_clk_frequency_khz(0)*1000/hsync_len; | 80 | return get_clk_frequency_khz(0)*1000/hsync_invperiod; |
81 | else | 81 | else |
82 | return 0; | 82 | return 0; |
83 | } | 83 | } |
@@ -114,7 +114,7 @@ static int sync_receive_data_send_cmd(struct corgi_ts *corgi_ts, int doRecive, i | |||
114 | if (timer2-timer1 > wait_time) { | 114 | if (timer2-timer1 > wait_time) { |
115 | /* too slow - timeout, try again */ | 115 | /* too slow - timeout, try again */ |
116 | corgi_ts->machinfo->wait_hsync(); | 116 | corgi_ts->machinfo->wait_hsync(); |
117 | /* get OSCR */ | 117 | /* get CCNT */ |
118 | CCNT(timer1); | 118 | CCNT(timer1); |
119 | /* Wait after HSync */ | 119 | /* Wait after HSync */ |
120 | CCNT(timer2); | 120 | CCNT(timer2); |