MSM8909的觸控式螢幕驅動導致的熄屏後重新亮屏速度慢的原因!
使用的匯頂的觸控驅動的時候會重新亮屏速度慢3秒,而在使用另外一個敦泰觸控驅動的時候沒有發現問題。比較程式碼後發現,fb_notifier_callback的影響是關鍵.
有問題的程式碼是:
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data)
{
struct fb_event *evdata = data;
int *blank;
struct goodix_ts_data *ts =
container_of(self, struct goodix_ts_data, fb_notif);
if (evdata && evdata->data && event == FB_EVENT_BLANK && ts && ts->client) { blank = evdata->data;
GTP_DEBUG("fb notifier callback blank :%d",*blank);
if (*blank == FB_BLANK_UNBLANK)
goodix_ts_resume(&ts->client->dev);
else if (*blank == FB_BLANK_POWERDOWN)
goodix_ts_suspend(&ts->client->dev);
}
return 0;
}
修改為下面的方式後正常:
static int fb_notifier_callback(struct notifier_block *self,
unsigned long event, void *data){ struct fb_event *evdata = data; int *blank; struct goodix_ts_data *ts = container_of(self, struct goodix_ts_data, fb_notif);