Lines Matching +full:wake +full:- +full:up

1 // SPDX-License-Identifier: GPL-2.0
14 - auto idle mode support
67 struct input_dev *input_dev = ts->input_dev; in egalax_ts_interrupt()
68 struct i2c_client *client = ts->client; in egalax_ts_interrupt()
77 } while (ret == -EAGAIN && tries++ < EGALAX_MAX_TRIES); in egalax_ts_interrupt()
97 dev_dbg(&client->dev, "point invalid\n"); in egalax_ts_interrupt()
104 dev_dbg(&client->dev, "%s id:%d x:%d y:%d z:%d", in egalax_ts_interrupt()
105 down ? "down" : "up", id, x, y, z); in egalax_ts_interrupt()
119 /* wake up controller by an falling edge of interrupt gpio. */
122 struct device_node *np = client->dev.of_node; in egalax_wake_up_device()
127 return -ENODEV; in egalax_wake_up_device()
129 gpio = of_get_named_gpio(np, "wakeup-gpios", 0); in egalax_wake_up_device()
131 return -ENODEV; in egalax_wake_up_device()
135 dev_err(&client->dev, in egalax_wake_up_device()
136 "request gpio failed, cannot wake up controller: %d\n", in egalax_wake_up_device()
141 /* wake up controller via an falling edge on IRQ gpio. */ in egalax_wake_up_device()
145 /* controller should be waken up, return irq. */ in egalax_wake_up_device()
171 ts = devm_kzalloc(&client->dev, sizeof(struct egalax_ts), GFP_KERNEL); in egalax_ts_probe()
173 dev_err(&client->dev, "Failed to allocate memory\n"); in egalax_ts_probe()
174 return -ENOMEM; in egalax_ts_probe()
177 input_dev = devm_input_allocate_device(&client->dev); in egalax_ts_probe()
179 dev_err(&client->dev, "Failed to allocate memory\n"); in egalax_ts_probe()
180 return -ENOMEM; in egalax_ts_probe()
183 ts->client = client; in egalax_ts_probe()
184 ts->input_dev = input_dev; in egalax_ts_probe()
186 /* controller may be in sleep, wake it up. */ in egalax_ts_probe()
189 dev_err(&client->dev, "Failed to wake up the controller\n"); in egalax_ts_probe()
195 dev_err(&client->dev, "Failed to read firmware version\n"); in egalax_ts_probe()
199 input_dev->name = "EETI eGalax Touch Screen"; in egalax_ts_probe()
200 input_dev->id.bustype = BUS_I2C; in egalax_ts_probe()
202 __set_bit(EV_ABS, input_dev->evbit); in egalax_ts_probe()
203 __set_bit(EV_KEY, input_dev->evbit); in egalax_ts_probe()
204 __set_bit(BTN_TOUCH, input_dev->keybit); in egalax_ts_probe()
214 error = devm_request_threaded_irq(&client->dev, client->irq, NULL, in egalax_ts_probe()
219 dev_err(&client->dev, "Failed to register interrupt\n"); in egalax_ts_probe()
223 error = input_register_device(ts->input_dev); in egalax_ts_probe()
245 return enable_irq_wake(client->irq); in egalax_ts_suspend()
256 return disable_irq_wake(client->irq); in egalax_ts_resume()