Lines Matching refs:drv_data
23 struct adxl372_data *drv_data = dev->data; in adxl372_thread_cb() local
32 if (drv_data->th_handler != NULL) { in adxl372_thread_cb()
38 drv_data->th_handler(dev, drv_data->th_trigger); in adxl372_thread_cb()
42 drv_data->th_handler(dev, drv_data->th_trigger); in adxl372_thread_cb()
46 if ((drv_data->drdy_handler != NULL) && in adxl372_thread_cb()
48 drv_data->drdy_handler(dev, drv_data->drdy_trigger); in adxl372_thread_cb()
61 struct adxl372_data *drv_data = in adxl372_gpio_callback() local
63 const struct adxl372_dev_config *cfg = drv_data->dev->config; in adxl372_gpio_callback()
68 adxl372_stream_irq_handler(drv_data->dev); in adxl372_gpio_callback()
72 k_sem_give(&drv_data->gpio_sem); in adxl372_gpio_callback()
74 k_work_submit(&drv_data->work); in adxl372_gpio_callback()
84 struct adxl372_data *drv_data = p1; in adxl372_thread() local
87 k_sem_take(&drv_data->gpio_sem, K_FOREVER); in adxl372_thread()
88 adxl372_thread_cb(drv_data->dev); in adxl372_thread()
95 struct adxl372_data *drv_data = in adxl372_work_cb() local
98 adxl372_thread_cb(drv_data->dev); in adxl372_work_cb()
107 struct adxl372_data *drv_data = dev->data; in adxl372_trigger_set() local
119 drv_data->th_handler = handler; in adxl372_trigger_set()
120 drv_data->th_trigger = trig; in adxl372_trigger_set()
125 drv_data->drdy_handler = handler; in adxl372_trigger_set()
126 drv_data->drdy_trigger = trig; in adxl372_trigger_set()
140 ret = drv_data->hw_tf->write_reg_mask(dev, ADXL372_INT1_MAP, int_mask, int_en); in adxl372_trigger_set()
162 struct adxl372_data *drv_data = dev->data; in adxl372_init_interrupt() local
175 gpio_init_callback(&drv_data->gpio_cb, in adxl372_init_interrupt()
179 ret = gpio_add_callback(cfg->interrupt.port, &drv_data->gpio_cb); in adxl372_init_interrupt()
185 drv_data->dev = dev; in adxl372_init_interrupt()
188 k_sem_init(&drv_data->gpio_sem, 0, K_SEM_MAX_LIMIT); in adxl372_init_interrupt()
190 k_thread_create(&drv_data->thread, drv_data->thread_stack, in adxl372_init_interrupt()
192 adxl372_thread, drv_data, in adxl372_init_interrupt()
196 k_thread_name_set(&drv_data->thread, dev->name); in adxl372_init_interrupt()
198 drv_data->work.handler = adxl372_work_cb; in adxl372_init_interrupt()