Lines Matching full:button

304 	struct qt1050_key *button = &ts->keys[0];  in qt1050_apply_fw_data()  local
315 for (i = 0; i < QT1050_MAX_KEYS; i++, button++) { in qt1050_apply_fw_data()
317 if (button->keycode == KEY_RESERVED) in qt1050_apply_fw_data()
320 err = qt1050_set_key(map, button->num, 1); in qt1050_apply_fw_data()
324 key_regs = qt1050_get_key_regs(button->num); in qt1050_apply_fw_data()
327 (button->samples << 4) | (button->scale)); in qt1050_apply_fw_data()
330 err = regmap_write(map, key_regs->csd, button->charge_delay); in qt1050_apply_fw_data()
333 err = regmap_write(map, key_regs->nthr, button->thr_cnt); in qt1050_apply_fw_data()
352 struct qt1050_key button; in qt1050_parse_fw() local
356 &button.keycode)) { in qt1050_parse_fw()
357 dev_err(dev, "Button without keycode\n"); in qt1050_parse_fw()
360 if (button.keycode >= KEY_MAX) { in qt1050_parse_fw()
362 button.keycode); in qt1050_parse_fw()
367 &button.num)) { in qt1050_parse_fw()
368 dev_err(dev, "Button without pad number\n"); in qt1050_parse_fw()
371 if (button.num < 0 || button.num > QT1050_MAX_KEYS - 1) in qt1050_parse_fw()
374 ts->reg_keys |= BIT(button.num); in qt1050_parse_fw()
379 &button.charge_delay)) { in qt1050_parse_fw()
380 button.charge_delay = 0; in qt1050_parse_fw()
382 if (button.charge_delay % 2500 == 0) in qt1050_parse_fw()
383 button.charge_delay = in qt1050_parse_fw()
384 button.charge_delay / 2500; in qt1050_parse_fw()
386 button.charge_delay = 0; in qt1050_parse_fw()
390 &button.samples)) { in qt1050_parse_fw()
391 button.samples = 0; in qt1050_parse_fw()
393 if (is_power_of_2(button.samples)) in qt1050_parse_fw()
394 button.samples = ilog2(button.samples); in qt1050_parse_fw()
396 button.samples = 0; in qt1050_parse_fw()
400 &button.scale)) { in qt1050_parse_fw()
401 button.scale = 0; in qt1050_parse_fw()
403 if (is_power_of_2(button.scale)) in qt1050_parse_fw()
404 button.scale = ilog2(button.scale); in qt1050_parse_fw()
406 button.scale = 0; in qt1050_parse_fw()
411 &button.thr_cnt)) { in qt1050_parse_fw()
412 button.thr_cnt = 20; in qt1050_parse_fw()
414 if (button.thr_cnt > 255) in qt1050_parse_fw()
415 button.thr_cnt = 20; in qt1050_parse_fw()
418 ts->keys[button.num] = button; in qt1050_parse_fw()