浏览代码

input: Add debugging for key matrix key codes

These are read from the fdt - add a debug feature to display the mapping
on start-up.

See that we get debug output listing the keycodes

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 12 年之前
父节点
当前提交
14813f19e3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/input/key_matrix.c

+ 2 - 0
drivers/input/key_matrix.c

@@ -145,6 +145,8 @@ static uchar *create_keymap(struct key_matrix *config, u32 *data, int len,
 		key_code = tmp & 0xffff;
 		entry = row * config->num_cols + col;
 		map[entry] = key_code;
+		debug("   map %d, %d: pos=%d, keycode=%d\n", row, col,
+		      entry, key_code);
 		if (pos && map_keycode == key_code)
 			*pos = entry;
 	}