Lines Matching refs:new_state
171 static int pmic8xxx_kp_read_matrix(struct pmic8xxx_kp *kp, u16 *new_state,
194 rc = pmic8xxx_kp_read_data(kp, new_state, KEYP_RECENT_DATA,
219 static void __pmic8xxx_kp_scan_matrix(struct pmic8xxx_kp *kp, u16 *new_state,
225 int bits_changed = new_state[row] ^ old_state[row];
235 !(new_state[row] & (1 << col)) ?
243 !(new_state[row] & (1 << col)));
250 static bool pmic8xxx_detect_ghost_keys(struct pmic8xxx_kp *kp, u16 *new_state)
257 row_state = (~new_state[row]) &
276 u16 new_state[PM8XXX_MAX_ROWS];
282 rc = pmic8xxx_kp_read_matrix(kp, new_state, NULL);
287 if (pmic8xxx_detect_ghost_keys(kp, new_state))
289 __pmic8xxx_kp_scan_matrix(kp, new_state, kp->keystate);
290 memcpy(kp->keystate, new_state, sizeof(new_state));
293 rc = pmic8xxx_kp_read_matrix(kp, new_state, old_state);
298 __pmic8xxx_kp_scan_matrix(kp, new_state, old_state);
299 memcpy(kp->keystate, new_state, sizeof(new_state));
303 rc = pmic8xxx_kp_read_matrix(kp, new_state, old_state);
307 __pmic8xxx_kp_scan_matrix(kp, new_state, old_state);
308 memcpy(kp->keystate, new_state, sizeof(new_state));
329 u16 new_state[PM8XXX_MAX_ROWS];
334 rc = pmic8xxx_kp_read_matrix(kp, new_state, old_state);
340 __pmic8xxx_kp_scan_matrix(kp, new_state, kp->stuckstate);