Lines Matching refs:gmouse
72 struct gpio_mouse *gmouse; in gpio_mouse_probe() local
76 gmouse = devm_kzalloc(dev, sizeof(*gmouse), GFP_KERNEL); in gpio_mouse_probe()
77 if (!gmouse) in gpio_mouse_probe()
82 &gmouse->scan_ms); in gpio_mouse_probe()
83 if (error || gmouse->scan_ms == 0) { in gpio_mouse_probe()
85 gmouse->scan_ms = 50; in gpio_mouse_probe()
88 gmouse->up = devm_gpiod_get(dev, "up", GPIOD_IN); in gpio_mouse_probe()
89 if (IS_ERR(gmouse->up)) in gpio_mouse_probe()
90 return PTR_ERR(gmouse->up); in gpio_mouse_probe()
91 gmouse->down = devm_gpiod_get(dev, "down", GPIOD_IN); in gpio_mouse_probe()
92 if (IS_ERR(gmouse->down)) in gpio_mouse_probe()
93 return PTR_ERR(gmouse->down); in gpio_mouse_probe()
94 gmouse->left = devm_gpiod_get(dev, "left", GPIOD_IN); in gpio_mouse_probe()
95 if (IS_ERR(gmouse->left)) in gpio_mouse_probe()
96 return PTR_ERR(gmouse->left); in gpio_mouse_probe()
97 gmouse->right = devm_gpiod_get(dev, "right", GPIOD_IN); in gpio_mouse_probe()
98 if (IS_ERR(gmouse->right)) in gpio_mouse_probe()
99 return PTR_ERR(gmouse->right); in gpio_mouse_probe()
101 gmouse->bleft = devm_gpiod_get_optional(dev, "button-left", GPIOD_IN); in gpio_mouse_probe()
102 if (IS_ERR(gmouse->bleft)) in gpio_mouse_probe()
103 return PTR_ERR(gmouse->bleft); in gpio_mouse_probe()
104 gmouse->bmiddle = devm_gpiod_get_optional(dev, "button-middle", in gpio_mouse_probe()
106 if (IS_ERR(gmouse->bmiddle)) in gpio_mouse_probe()
107 return PTR_ERR(gmouse->bmiddle); in gpio_mouse_probe()
108 gmouse->bright = devm_gpiod_get_optional(dev, "button-right", in gpio_mouse_probe()
110 if (IS_ERR(gmouse->bright)) in gpio_mouse_probe()
111 return PTR_ERR(gmouse->bright); in gpio_mouse_probe()
120 input_set_drvdata(input, gmouse); in gpio_mouse_probe()
124 if (gmouse->bleft) in gpio_mouse_probe()
126 if (gmouse->bmiddle) in gpio_mouse_probe()
128 if (gmouse->bright) in gpio_mouse_probe()
135 input_set_poll_interval(input, gmouse->scan_ms); in gpio_mouse_probe()
144 gmouse->scan_ms, in gpio_mouse_probe()
145 gmouse->bleft ? "" : "left ", in gpio_mouse_probe()
146 gmouse->bmiddle ? "" : "middle ", in gpio_mouse_probe()
147 gmouse->bright ? "" : "right"); in gpio_mouse_probe()