Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7479
b: refs/heads/master
c: 74b7489
h: refs/heads/master
i:
  7477: e42a301
  7475: 0ae6477
  7471: 816a721
v: v3
  • Loading branch information
Richard Purdie authored and Linus Torvalds committed Sep 7, 2005
1 parent ed6bf21 commit d81d891
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 347e4843fa1fc21bf542c6f086fcf5ef1ab5f58e
refs/heads/master: 74b74890bc23b8c6f5b0c0d99f6e1b3d39cb3dae
16 changes: 8 additions & 8 deletions trunk/drivers/input/touchscreen/corgi_ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ static unsigned long calc_waittime(void)
int w100fb_xres = w100fb_get_xres();
unsigned int waittime = 0;

if (w100fb_get_blanking())
return 0;

if (w100fb_xres == 480 || w100fb_xres == 640) {
waittime = WAIT_HS_400_VGA * get_clk_frequency_khz(0) / 398131U;

Expand All @@ -98,11 +101,8 @@ static int sync_receive_data_send_cmd(int doRecive, int doSend, unsigned int add
{
unsigned long timer1 = 0, timer2, pmnc = 0;
int pos = 0;
int dosleep;

dosleep = !w100fb_get_blanking();

if (dosleep && doSend) {
if (wait_time && doSend) {
PMNC_GET(pmnc);
if (!(pmnc & 0x01))
PMNC_SET(pmnc | 0x01);
Expand All @@ -122,11 +122,11 @@ static int sync_receive_data_send_cmd(int doRecive, int doSend, unsigned int add
corgi_ssp_ads7846_put(cmd);
corgi_ssp_ads7846_get();

if (dosleep) {
if (wait_time) {
/* Wait after HSync */
CCNT(timer2);
if (timer2-timer1 > wait_time) {
/* timeout */
/* too slow - timeout, try again */
SyncHS();
/* get OSCR */
CCNT(timer1);
Expand All @@ -137,7 +137,7 @@ static int sync_receive_data_send_cmd(int doRecive, int doSend, unsigned int add
CCNT(timer2);
}
corgi_ssp_ads7846_put(cmd);
if (dosleep && !(pmnc & 0x01))
if (wait_time && !(pmnc & 0x01))
PMNC_SET(pmnc);
}
return pos;
Expand Down Expand Up @@ -247,7 +247,7 @@ static irqreturn_t ts_interrupt(int irq, void *dev_id, struct pt_regs *regs)
}

#ifdef CONFIG_PM
static int corgits_suspend(struct device *dev, uint32_t state, uint32_t level)
static int corgits_suspend(struct device *dev, pm_message_t state, uint32_t level)
{
if (level == SUSPEND_POWER_DOWN) {
struct corgi_ts *corgi_ts = dev_get_drvdata(dev);
Expand Down

0 comments on commit d81d891

Please sign in to comment.