感冒好點了,得瑟了。
尼瑪早上加代碼,
改了沒多少,就尼瑪kernel panic了,有木有
尼瑪跟函數地址跟了一早上,有木有
尼瑪最終也沒看出來。。。
尼瑪還是把代碼回過去再重新改才發現
尼瑪就是因爲少判斷了一種情況就kernel panic了有木有
尼瑪淚牛滿面啊
尼瑪昨天把我的一行寫寄存器的代碼去掉後。。。
尼瑪不能開機的問題就沒有了,有木有
尼瑪就一行啊。。。。。有木有
尼瑪項目經理還說我太瘋狂了,
尼瑪有木有啊。。。。
亂寫了一個,不符合咆哮體吧可能,沒有掌握寫作方法。就假裝是個咆哮體吧,哈哈。
今天寫的東西不多其實,晚上回來發了個patch,估計應該不能被用。只要大家能給我評論一下爲啥不能被用就很不錯了呢,就怕沒人鳥。。。。哈哈。
嗯 ,就這樣吧,把昨天的代碼貼一下,開源啊。
1: #ifndef CONFIG_TOUCHSCREEN_SX8651_WITH_KEYPAD
2: static void touch_key_set_capacity(struct input_dev *input) {};
3: static void touch_key_up(struct input_dev *input) {};
4: static void touch_key_event(struct input_dev *input, u16 x, u16 y) {};
5: #else
6: static int touch_key_pos[] = {700, 1650, 2550, 3500};
7: static int touch_key_map[] = {KEY_MENU, KEY_HOME, KEY_BACK, KEY_SEARCH};
8: /* you can modify this value to change the touch_key's sensitivity */
9: static int touch_key_sensitivity = 50;
10:
11: static void touch_key_set_capacity(struct input_dev *input)
12: {
13: int i;
14: for (i = 0; i < ARRAY_SIZE(touch_key_map); i++) {
15: input_set_capability(input, EV_KEY, touch_key_map[i]);
16: }
17: }
18:
19: /* you must have an input_sync() followed this func . */
20: static void touch_key_up(struct input_dev *input)
21: {
22: int i;
23: for (i = 0; i < ARRAY_SIZE(touch_key_map); i++) {
24: input_report_key(input, touch_key_map[i], 0);
25: }
26: }
27:
28: static void touch_key_event(struct input_dev *input, u16 x, u16 y)
29: {
30: int i;
31: if (y > Y_MAX) {
32: for (i = 0; i < ARRAY_SIZE(touch_key_pos); i++) {
33: if ((x > (touch_key_pos[i] - touch_key_sensitivity)) &&
34: (x < (touch_key_pos[i] + touch_key_sensitivity))) {
35: input_report_key(input, touch_key_map[i], 1);
36: input_sync(input);
37: }
38: }
39: }
40: }
41: #endif