Lines Matching +full:col +full:- +full:size

6  * SPDX-License-Identifier: Apache-2.0
76 uint8_t low_size; /*!< Low byte of point size. */
77 uint8_t high_size; /*!< High byte of point size. */
82 * Device-specific wrappers around i2c_write_dt and i2c_write_read_dt.
88 const struct gt911_config *config = dev->config; in gt911_i2c_write()
89 struct gt911_data *data = dev->data; in gt911_i2c_write()
91 return i2c_write(config->bus.bus, buf, num_bytes, data->actual_address); in gt911_i2c_write()
97 const struct gt911_config *config = dev->config; in gt911_i2c_write_read()
98 struct gt911_data *data = dev->data; in gt911_i2c_write_read()
100 return i2c_write_read(config->bus.bus, data->actual_address, write_buf, num_write, read_buf, in gt911_i2c_write_read()
112 uint16_t col; in gt911_process() local
131 * Note- since we program the max number of touch inputs during init, in gt911_process()
163 col = ((point_reg[i].high_x) << 8U) | point_reg[i].low_x; in gt911_process()
165 input_report_abs(dev, INPUT_ABS_X, col, false, K_FOREVER); in gt911_process()
185 col = ((prev_point_reg[i].high_x) << 8U) | prev_point_reg[i].low_x; in gt911_process()
186 input_report_abs(dev, INPUT_ABS_X, col, false, K_FOREVER); in gt911_process()
202 gt911_process(data->dev); in gt911_work_handler()
210 k_work_submit(&data->work); in gt911_isr_handler()
217 k_work_submit(&data->work); in gt911_timer_handler()
226 for (i = 0; i < REG_CONFIG_SIZE - 2U; i++) { in gt911_get_firmware_checksum()
236 return ((firmware[REG_CONFIG_VERSION - REG_GT911_CONFIG] != 0U) && in gt911_verify_firmware()
237 (gt911_get_firmware_checksum(firmware) == firmware[REG_CONFIG_SIZE - 2U])); in gt911_verify_firmware()
242 const struct gt911_config *config = dev->config; in gt911_init()
243 struct gt911_data *data = dev->data; in gt911_init()
245 if (!i2c_is_ready_dt(&config->bus)) { in gt911_init()
247 return -ENODEV; in gt911_init()
250 data->dev = dev; in gt911_init()
251 data->actual_address = config->bus.addr; in gt911_init()
253 k_work_init(&data->work, gt911_work_handler); in gt911_init()
257 if (!gpio_is_ready_dt(&config->int_gpio)) { in gt911_init()
259 return -ENODEV; in gt911_init()
262 if (config->rst_gpio.port != NULL) { in gt911_init()
263 if (!gpio_is_ready_dt(&config->rst_gpio)) { in gt911_init()
265 return -ENODEV; in gt911_init()
268 r = gpio_pin_configure_dt(&config->rst_gpio, GPIO_OUTPUT_ACTIVE); in gt911_init()
276 * We need to configure the int-pin to 0, in order to enter the in gt911_init()
284 r = gpio_pin_configure_dt(&config->int_gpio, GPIO_OUTPUT_INACTIVE); in gt911_init()
291 if (config->rst_gpio.port != NULL) { in gt911_init()
293 gpio_pin_set_dt(&config->rst_gpio, 1); in gt911_init()
296 gpio_pin_set_dt(&config->rst_gpio, 0); in gt911_init()
303 r = gpio_pin_configure_dt(&config->int_gpio, GPIO_INPUT); in gt911_init()
310 r = gpio_pin_interrupt_configure_dt(&config->int_gpio, GPIO_INT_EDGE_TO_ACTIVE); in gt911_init()
316 gpio_init_callback(&data->int_gpio_cb, gt911_isr_handler, BIT(config->int_gpio.pin)); in gt911_init()
318 k_timer_init(&data->timer, gt911_timer_handler, NULL); in gt911_init()
325 if (config->alt_addr != 0x0) { in gt911_init()
337 data->actual_address = config->alt_addr; in gt911_init()
342 data->actual_address); in gt911_init()
353 return -ENODEV; in gt911_init()
367 return -ENODEV; in gt911_init()
383 r = gpio_add_callback(config->int_gpio.port, &data->int_gpio_cb); in gt911_init()
389 k_timer_start(&data->timer, K_MSEC(CONFIG_INPUT_GT911_PERIOD_MS), in gt911_init()