Lines Matching refs:sensehat_joystick

23 struct sensehat_joystick {  struct
36 struct sensehat_joystick *sensehat_joystick = cookie; in sensehat_joystick_report() argument
42 error = regmap_read(sensehat_joystick->regmap, JOYSTICK_SMB_REG, &keys); in sensehat_joystick_report()
44 dev_err(&sensehat_joystick->pdev->dev, in sensehat_joystick_report()
49 bitmap_xor(&changes, &curr_states, &sensehat_joystick->prev_states, in sensehat_joystick_report()
53 input_report_key(sensehat_joystick->keys_dev, keymap[i], in sensehat_joystick_report()
56 input_sync(sensehat_joystick->keys_dev); in sensehat_joystick_report()
57 sensehat_joystick->prev_states = keys; in sensehat_joystick_report()
63 struct sensehat_joystick *sensehat_joystick; in sensehat_joystick_probe() local
66 sensehat_joystick = devm_kzalloc(&pdev->dev, sizeof(*sensehat_joystick), in sensehat_joystick_probe()
68 if (!sensehat_joystick) in sensehat_joystick_probe()
71 sensehat_joystick->pdev = pdev; in sensehat_joystick_probe()
73 sensehat_joystick->regmap = dev_get_regmap(pdev->dev.parent, NULL); in sensehat_joystick_probe()
74 if (!sensehat_joystick->regmap) { in sensehat_joystick_probe()
79 sensehat_joystick->keys_dev = devm_input_allocate_device(&pdev->dev); in sensehat_joystick_probe()
80 if (!sensehat_joystick->keys_dev) { in sensehat_joystick_probe()
85 sensehat_joystick->keys_dev->name = "Raspberry Pi Sense HAT Joystick"; in sensehat_joystick_probe()
86 sensehat_joystick->keys_dev->phys = "sensehat-joystick/input0"; in sensehat_joystick_probe()
87 sensehat_joystick->keys_dev->id.bustype = BUS_I2C; in sensehat_joystick_probe()
89 __set_bit(EV_KEY, sensehat_joystick->keys_dev->evbit); in sensehat_joystick_probe()
90 __set_bit(EV_REP, sensehat_joystick->keys_dev->evbit); in sensehat_joystick_probe()
92 __set_bit(keymap[i], sensehat_joystick->keys_dev->keybit); in sensehat_joystick_probe()
94 error = input_register_device(sensehat_joystick->keys_dev); in sensehat_joystick_probe()
107 sensehat_joystick); in sensehat_joystick_probe()