Lines Matching refs:bdev
37 struct buttons_dev *bdev = input_get_drvdata(input); in handle_buttons() local
41 status = ~readl(bdev->reg) >> 24; in handle_buttons()
43 for (i = 0; i < ARRAY_SIZE(bdev->keymap); i++) { in handle_buttons()
45 if (++bdev->count[i] == BUTTONS_COUNT_THRESHOLD) { in handle_buttons()
47 input_report_key(input, bdev->keymap[i], 1); in handle_buttons()
51 if (bdev->count[i] >= BUTTONS_COUNT_THRESHOLD) { in handle_buttons()
53 input_report_key(input, bdev->keymap[i], 0); in handle_buttons()
56 bdev->count[i] = 0; in handle_buttons()
63 struct buttons_dev *bdev; in cobalt_buttons_probe() local
68 bdev = devm_kzalloc(&pdev->dev, sizeof(*bdev), GFP_KERNEL); in cobalt_buttons_probe()
69 if (!bdev) in cobalt_buttons_probe()
76 bdev->reg = devm_ioremap(&pdev->dev, res->start, resource_size(res)); in cobalt_buttons_probe()
77 if (!bdev->reg) in cobalt_buttons_probe()
80 memcpy(bdev->keymap, cobalt_map, sizeof(bdev->keymap)); in cobalt_buttons_probe()
86 input_set_drvdata(input, bdev); in cobalt_buttons_probe()
92 input->keycode = bdev->keymap; in cobalt_buttons_probe()
93 input->keycodemax = ARRAY_SIZE(bdev->keymap); in cobalt_buttons_probe()
99 __set_bit(bdev->keymap[i], input->keybit); in cobalt_buttons_probe()