mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[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 <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
2e927b7626
commit
ca4d6cfcee
8 changed files with 292 additions and 328 deletions
|
|
@ -74,10 +74,10 @@ extern unsigned int get_clk_frequency_khz(int info);
|
|||
|
||||
static unsigned long calc_waittime(struct corgi_ts *corgi_ts)
|
||||
{
|
||||
unsigned long hsync_len = corgi_ts->machinfo->get_hsync_len();
|
||||
unsigned long hsync_invperiod = corgi_ts->machinfo->get_hsync_invperiod();
|
||||
|
||||
if (hsync_len)
|
||||
return get_clk_frequency_khz(0)*1000/hsync_len;
|
||||
if (hsync_invperiod)
|
||||
return get_clk_frequency_khz(0)*1000/hsync_invperiod;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ static int sync_receive_data_send_cmd(struct corgi_ts *corgi_ts, int doRecive, i
|
|||
if (timer2-timer1 > wait_time) {
|
||||
/* too slow - timeout, try again */
|
||||
corgi_ts->machinfo->wait_hsync();
|
||||
/* get OSCR */
|
||||
/* get CCNT */
|
||||
CCNT(timer1);
|
||||
/* Wait after HSync */
|
||||
CCNT(timer2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue