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()
356 struct qt1050_key button; in qt1050_parse_fw() local
360 &button.keycode)) { in qt1050_parse_fw()
361 dev_err(dev, "Button without keycode\n"); in qt1050_parse_fw()
364 if (button.keycode >= KEY_MAX) { in qt1050_parse_fw()
366 button.keycode); in qt1050_parse_fw()
371 &button.num)) { in qt1050_parse_fw()
372 dev_err(dev, "Button without pad number\n"); in qt1050_parse_fw()
375 if (button.num < 0 || button.num > QT1050_MAX_KEYS - 1) in qt1050_parse_fw()
378 ts->reg_keys |= BIT(button.num); in qt1050_parse_fw()
383 &button.charge_delay)) { in qt1050_parse_fw()
384 button.charge_delay = 0; in qt1050_parse_fw()
386 if (button.charge_delay % 2500 == 0) in qt1050_parse_fw()
387 button.charge_delay = in qt1050_parse_fw()
388 button.charge_delay / 2500; in qt1050_parse_fw()
390 button.charge_delay = 0; in qt1050_parse_fw()
394 &button.samples)) { in qt1050_parse_fw()
395 button.samples = 0; in qt1050_parse_fw()
397 if (is_power_of_2(button.samples)) in qt1050_parse_fw()
398 button.samples = ilog2(button.samples); in qt1050_parse_fw()
400 button.samples = 0; in qt1050_parse_fw()
404 &button.scale)) { in qt1050_parse_fw()
405 button.scale = 0; in qt1050_parse_fw()
407 if (is_power_of_2(button.scale)) in qt1050_parse_fw()
408 button.scale = ilog2(button.scale); in qt1050_parse_fw()
410 button.scale = 0; in qt1050_parse_fw()
415 &button.thr_cnt)) { in qt1050_parse_fw()
416 button.thr_cnt = 20; in qt1050_parse_fw()
418 if (button.thr_cnt > 255) in qt1050_parse_fw()
419 button.thr_cnt = 20; in qt1050_parse_fw()
422 ts->keys[button.num] = button; in qt1050_parse_fw()