Lines Matching refs:drv_data
23 struct adxl345_dev_data *drv_data = dev->data; in adxl345_thread_cb() local
32 if ((drv_data->drdy_handler != NULL) && in adxl345_thread_cb()
34 drv_data->drdy_handler(dev, drv_data->drdy_trigger); in adxl345_thread_cb()
46 struct adxl345_dev_data *drv_data = in adxl345_gpio_callback() local
48 const struct adxl345_dev_config *cfg = drv_data->dev->config; in adxl345_gpio_callback()
53 adxl345_stream_irq_handler(drv_data->dev); in adxl345_gpio_callback()
57 k_sem_give(&drv_data->gpio_sem); in adxl345_gpio_callback()
59 k_work_submit(&drv_data->work); in adxl345_gpio_callback()
69 struct adxl345_dev_data *drv_data = p1; in adxl345_thread() local
72 k_sem_take(&drv_data->gpio_sem, K_FOREVER); in adxl345_thread()
73 adxl345_thread_cb(drv_data->dev); in adxl345_thread()
80 struct adxl345_dev_data *drv_data = in adxl345_work_cb() local
83 adxl345_thread_cb(drv_data->dev); in adxl345_work_cb()
92 struct adxl345_dev_data *drv_data = dev->data; in adxl345_trigger_set() local
104 drv_data->drdy_handler = handler; in adxl345_trigger_set()
105 drv_data->drdy_trigger = trig; in adxl345_trigger_set()
141 struct adxl345_dev_data *drv_data = dev->data; in adxl345_init_interrupt() local
154 gpio_init_callback(&drv_data->gpio_cb, in adxl345_init_interrupt()
158 ret = gpio_add_callback(cfg->interrupt.port, &drv_data->gpio_cb); in adxl345_init_interrupt()
164 drv_data->dev = dev; in adxl345_init_interrupt()
167 k_sem_init(&drv_data->gpio_sem, 0, K_SEM_MAX_LIMIT); in adxl345_init_interrupt()
169 k_thread_create(&drv_data->thread, drv_data->thread_stack, in adxl345_init_interrupt()
171 adxl345_thread, drv_data, in adxl345_init_interrupt()
175 drv_data->work.handler = adxl345_work_cb; in adxl345_init_interrupt()