Lines Matching refs:col
56 static void __activate_col(struct matrix_keypad *keypad, int col, bool on) in __activate_col() argument
59 gpiod_direction_output(keypad->col_gpios[col], 1); in __activate_col()
61 gpiod_set_value_cansleep(keypad->col_gpios[col], 0); in __activate_col()
63 gpiod_direction_input(keypad->col_gpios[col]); in __activate_col()
67 static void activate_col(struct matrix_keypad *keypad, int col, bool on) in activate_col() argument
69 __activate_col(keypad, col, on); in activate_col()
77 int col; in activate_all_cols() local
79 for (col = 0; col < keypad->num_col_gpios; col++) in activate_all_cols()
80 __activate_col(keypad, col, on); in activate_all_cols()
114 int row, col, code; in matrix_keypad_scan() local
125 for (col = 0; col < keypad->num_col_gpios; col++) { in matrix_keypad_scan()
127 activate_col(keypad, col, true); in matrix_keypad_scan()
130 new_state[col] |= in matrix_keypad_scan()
133 activate_col(keypad, col, false); in matrix_keypad_scan()
136 for (col = 0; col < keypad->num_col_gpios; col++) { in matrix_keypad_scan()
139 bits_changed = keypad->last_key_state[col] ^ new_state[col]; in matrix_keypad_scan()
147 code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); in matrix_keypad_scan()
151 new_state[col] & (1 << row)); in matrix_keypad_scan()