Lines Matching refs:matrix
96 struct ec_keymatrix_entry *matrix; /* the key matrix info */ member
214 ec->matrix = calloc(ec->matrix_count, sizeof(*ec->matrix)); in keyscan_read_fdt_matrix()
215 if (!ec->matrix) { in keyscan_read_fdt_matrix()
222 struct ec_keymatrix_entry *matrix = &ec->matrix[upto]; in keyscan_read_fdt_matrix() local
226 matrix->row = word >> 24; in keyscan_read_fdt_matrix()
227 matrix->col = (word >> 16) & 0xff; in keyscan_read_fdt_matrix()
228 matrix->keycode = word & 0xffff; in keyscan_read_fdt_matrix()
231 if (matrix->row >= KEYBOARD_ROWS || in keyscan_read_fdt_matrix()
232 matrix->col >= KEYBOARD_COLS) { in keyscan_read_fdt_matrix()
234 __func__, matrix->row, matrix->col); in keyscan_read_fdt_matrix()
257 const struct ec_keymatrix_entry *matrix; in cros_ec_keyscan() local
267 for (i = 0, matrix = ec->matrix; i < ec->matrix_count; i++, matrix++) { in cros_ec_keyscan()
272 if (matrix->keycode == key[j]) in cros_ec_keyscan()
277 debug("%d: %d,%d\n", matrix->keycode, matrix->row, in cros_ec_keyscan()
278 matrix->col); in cros_ec_keyscan()
279 ec->keyscan[matrix->col] |= 1 << matrix->row; in cros_ec_keyscan()