Lines Matching full:button

309 	struct qt1050_key *button = &ts->keys[0];  in qt1050_apply_fw_data()  local
320 for (i = 0; i < QT1050_MAX_KEYS; i++, button++) { in qt1050_apply_fw_data()
322 if (button->keycode == KEY_RESERVED) in qt1050_apply_fw_data()
325 err = qt1050_set_key(map, button->num, 1); in qt1050_apply_fw_data()
329 key_regs = qt1050_get_key_regs(button->num); in qt1050_apply_fw_data()
332 (button->samples << 4) | (button->scale)); in qt1050_apply_fw_data()
335 err = regmap_write(map, key_regs->csd, button->charge_delay); in qt1050_apply_fw_data()
338 err = regmap_write(map, key_regs->nthr, button->thr_cnt); in qt1050_apply_fw_data()
357 struct qt1050_key button; in qt1050_parse_fw() local
361 &button.keycode)) { in qt1050_parse_fw()
362 dev_err(dev, "Button without keycode\n"); in qt1050_parse_fw()
365 if (button.keycode >= KEY_MAX) { in qt1050_parse_fw()
367 button.keycode); in qt1050_parse_fw()
372 &button.num)) { in qt1050_parse_fw()
373 dev_err(dev, "Button without pad number\n"); in qt1050_parse_fw()
376 if (button.num < 0 || button.num > QT1050_MAX_KEYS - 1) in qt1050_parse_fw()
379 ts->reg_keys |= BIT(button.num); in qt1050_parse_fw()
384 &button.charge_delay)) { in qt1050_parse_fw()
385 button.charge_delay = 0; in qt1050_parse_fw()
387 if (button.charge_delay % 2500 == 0) in qt1050_parse_fw()
388 button.charge_delay = in qt1050_parse_fw()
389 button.charge_delay / 2500; in qt1050_parse_fw()
391 button.charge_delay = 0; in qt1050_parse_fw()
395 &button.samples)) { in qt1050_parse_fw()
396 button.samples = 0; in qt1050_parse_fw()
398 if (is_power_of_2(button.samples)) in qt1050_parse_fw()
399 button.samples = ilog2(button.samples); in qt1050_parse_fw()
401 button.samples = 0; in qt1050_parse_fw()
405 &button.scale)) { in qt1050_parse_fw()
406 button.scale = 0; in qt1050_parse_fw()
408 if (is_power_of_2(button.scale)) in qt1050_parse_fw()
409 button.scale = ilog2(button.scale); in qt1050_parse_fw()
411 button.scale = 0; in qt1050_parse_fw()
416 &button.thr_cnt)) { in qt1050_parse_fw()
417 button.thr_cnt = 20; in qt1050_parse_fw()
419 if (button.thr_cnt > 255) in qt1050_parse_fw()
420 button.thr_cnt = 20; in qt1050_parse_fw()
423 ts->keys[button.num] = button; in qt1050_parse_fw()