Lines Matching refs:lis2mdl
38 struct lis2mdl_data *lis2mdl = dev->data; in lis2mdl_trigger_set() local
47 lis2mdl->handler_drdy = handler; in lis2mdl_trigger_set()
48 lis2mdl->trig_drdy = trig; in lis2mdl_trigger_set()
65 struct lis2mdl_data *lis2mdl = dev->data; in lis2mdl_handle_interrupt() local
68 if (lis2mdl->handler_drdy != NULL) { in lis2mdl_handle_interrupt()
69 lis2mdl->handler_drdy(dev, lis2mdl->trig_drdy); in lis2mdl_handle_interrupt()
73 k_sem_give(&lis2mdl->fetch_sem); in lis2mdl_handle_interrupt()
83 struct lis2mdl_data *lis2mdl = in lis2mdl_gpio_callback() local
85 const struct lis2mdl_config *const cfg = lis2mdl->dev->config; in lis2mdl_gpio_callback()
92 k_sem_give(&lis2mdl->gpio_sem); in lis2mdl_gpio_callback()
94 k_work_submit(&lis2mdl->work); in lis2mdl_gpio_callback()
104 struct lis2mdl_data *lis2mdl = p1; in lis2mdl_thread() local
107 k_sem_take(&lis2mdl->gpio_sem, K_FOREVER); in lis2mdl_thread()
108 lis2mdl_handle_interrupt(lis2mdl->dev); in lis2mdl_thread()
116 struct lis2mdl_data *lis2mdl = in lis2mdl_work_cb() local
119 lis2mdl_handle_interrupt(lis2mdl->dev); in lis2mdl_work_cb()
125 struct lis2mdl_data *lis2mdl = dev->data; in lis2mdl_init_interrupt() local
136 k_sem_init(&lis2mdl->gpio_sem, 0, K_SEM_MAX_LIMIT); in lis2mdl_init_interrupt()
137 k_thread_create(&lis2mdl->thread, lis2mdl->thread_stack, in lis2mdl_init_interrupt()
139 lis2mdl_thread, lis2mdl, in lis2mdl_init_interrupt()
143 lis2mdl->work.handler = lis2mdl_work_cb; in lis2mdl_init_interrupt()
152 gpio_init_callback(&lis2mdl->gpio_cb, in lis2mdl_init_interrupt()
156 if (gpio_add_callback(cfg->gpio_drdy.port, &lis2mdl->gpio_cb) < 0) { in lis2mdl_init_interrupt()