Lines Matching refs:new_state
179 static int pmic8xxx_kp_read_matrix(struct pmic8xxx_kp *kp, u16 *new_state,
202 rc = pmic8xxx_kp_read_data(kp, new_state, KEYP_RECENT_DATA,
227 static void __pmic8xxx_kp_scan_matrix(struct pmic8xxx_kp *kp, u16 *new_state,
233 int bits_changed = new_state[row] ^ old_state[row];
243 !(new_state[row] & (1 << col)) ?
251 !(new_state[row] & (1 << col)));
258 static bool pmic8xxx_detect_ghost_keys(struct pmic8xxx_kp *kp, u16 *new_state)
265 row_state = (~new_state[row]) &
284 u16 new_state[PM8XXX_MAX_ROWS];
290 rc = pmic8xxx_kp_read_matrix(kp, new_state, NULL);
295 if (pmic8xxx_detect_ghost_keys(kp, new_state))
297 __pmic8xxx_kp_scan_matrix(kp, new_state, kp->keystate);
298 memcpy(kp->keystate, new_state, sizeof(new_state));
301 rc = pmic8xxx_kp_read_matrix(kp, new_state, old_state);
306 __pmic8xxx_kp_scan_matrix(kp, new_state, old_state);
307 memcpy(kp->keystate, new_state, sizeof(new_state));
311 rc = pmic8xxx_kp_read_matrix(kp, new_state, old_state);
315 __pmic8xxx_kp_scan_matrix(kp, new_state, old_state);
316 memcpy(kp->keystate, new_state, sizeof(new_state));
337 u16 new_state[PM8XXX_MAX_ROWS];
342 rc = pmic8xxx_kp_read_matrix(kp, new_state, old_state);
348 __pmic8xxx_kp_scan_matrix(kp, new_state, kp->stuckstate);