Lines Matching refs:col
55 static void __activate_col(struct matrix_keypad *keypad, int col, bool on) in __activate_col() argument
58 gpiod_direction_output(keypad->col_gpios[col], 1); in __activate_col()
60 gpiod_set_value_cansleep(keypad->col_gpios[col], 0); in __activate_col()
62 gpiod_direction_input(keypad->col_gpios[col]); in __activate_col()
66 static void activate_col(struct matrix_keypad *keypad, int col, bool on) in activate_col() argument
68 __activate_col(keypad, col, on); in activate_col()
76 int col; in activate_all_cols() local
78 for (col = 0; col < keypad->num_col_gpios; col++) in activate_all_cols()
79 __activate_col(keypad, col, on); in activate_all_cols()
113 int row, col, code; in matrix_keypad_scan() local
124 for (col = 0; col < keypad->num_col_gpios; col++) { in matrix_keypad_scan()
126 activate_col(keypad, col, true); in matrix_keypad_scan()
129 new_state[col] |= in matrix_keypad_scan()
132 activate_col(keypad, col, false); in matrix_keypad_scan()
135 for (col = 0; col < keypad->num_col_gpios; col++) { in matrix_keypad_scan()
138 bits_changed = keypad->last_key_state[col] ^ new_state[col]; in matrix_keypad_scan()
146 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in matrix_keypad_scan()
150 new_state[col] & (1 << row)); in matrix_keypad_scan()