Lines Matching +full:fn +full:- +full:keymap

7  * SPDX-License-Identifier:	GPL-2.0+
33 if (!config->ghost_filter || valid < 3) in has_ghosting()
39 * and the other is in the same column as the i-th key. in has_ghosting()
58 const u8 *keymap; in key_matrix_decode() local
63 keymap = config->plain_keycode; in key_matrix_decode()
67 debug(" valid=%d, row=%d, col=%d\n", key->valid, key->row, in key_matrix_decode()
68 key->col); in key_matrix_decode()
69 if (!key->valid) in key_matrix_decode()
71 pos = key->row * config->num_cols + key->col; in key_matrix_decode()
72 if (config->fn_keycode && pos == config->fn_pos) in key_matrix_decode()
73 keymap = config->fn_keycode; in key_matrix_decode()
77 keycode[valid++] = keymap[pos]; in key_matrix_decode()
78 debug(" keycode=%d\n", keymap[pos]); in key_matrix_decode()
99 * its position if found (this is used for finding the Fn key).
105 * @param pos Returns position of map_keycode, if found, else -1
114 *pos = -1; in create_keymap()
115 map = (uchar *)calloc(1, config->key_count); in create_keymap()
118 config->key_count); in create_keymap()
122 for (; len >= sizeof(u32); data++, len -= 4) { in create_keymap()
130 entry = row * config->num_cols + col; in create_keymap()
147 prop = dev_read_prop(dev, "linux,keymap", &proplen); in key_matrix_decode_fdt()
148 /* Basic keymap is required */ in key_matrix_decode_fdt()
150 debug("%s: cannot find keycode-plain map\n", __func__); in key_matrix_decode_fdt()
151 return -1; in key_matrix_decode_fdt()
155 &config->fn_pos); in key_matrix_decode_fdt()
156 config->plain_keycode = plain_keycode; in key_matrix_decode_fdt()
157 /* Conversion error -> fail */ in key_matrix_decode_fdt()
158 if (!config->plain_keycode) in key_matrix_decode_fdt()
159 return -1; in key_matrix_decode_fdt()
161 prop = dev_read_prop(dev, "linux,fn-keymap", &proplen); in key_matrix_decode_fdt()
162 /* fn keymap is optional */ in key_matrix_decode_fdt()
166 config->fn_keycode = create_keymap(config, prop, proplen, -1, NULL); in key_matrix_decode_fdt()
167 /* Conversion error -> fail */ in key_matrix_decode_fdt()
168 if (!config->fn_keycode) { in key_matrix_decode_fdt()
170 return -1; in key_matrix_decode_fdt()
175 config->plain_keycode, config->fn_keycode); in key_matrix_decode_fdt()
183 config->num_rows = rows; in key_matrix_init()
184 config->num_cols = cols; in key_matrix_init()
185 config->key_count = rows * cols; in key_matrix_init()
186 config->ghost_filter = ghost_filter; in key_matrix_init()
187 assert(config->key_count > 0); in key_matrix_init()