Lines Matching +defs:val +defs:button
55 static int tca6416_write_reg(struct tca6416_keypad_chip *chip, int reg, u16 val)
59 error = i2c_smbus_write_word_data(chip->client, reg << 1, val);
62 "%s failed, reg: %d, val: %d, error: %d\n",
63 __func__, reg, val, error);
70 static int tca6416_read_reg(struct tca6416_keypad_chip *chip, int reg, u16 *val)
81 *val = (u16)retval;
88 u16 reg_val, val;
98 val = reg_val ^ chip->reg_input;
102 if (val & (1 << i)) {
103 struct tca6416_button *button = &chip->buttons[pin_index];
104 unsigned int type = button->type ?: EV_KEY;
106 ^ button->active_low;
108 input_event(input, type, button->code, !!state);