Lines Matching refs:lsm6dso
130 struct lsm6dso_data *lsm6dso = dev->data; in lsm6dso_trigger_set() local
138 lsm6dso->handler_drdy_acc = handler; in lsm6dso_trigger_set()
139 lsm6dso->trig_drdy_acc = trig; in lsm6dso_trigger_set()
146 lsm6dso->handler_drdy_gyr = handler; in lsm6dso_trigger_set()
147 lsm6dso->trig_drdy_gyr = trig; in lsm6dso_trigger_set()
156 lsm6dso->handler_drdy_temp = handler; in lsm6dso_trigger_set()
157 lsm6dso->trig_drdy_temp = trig; in lsm6dso_trigger_set()
175 struct lsm6dso_data *lsm6dso = dev->data; in lsm6dso_handle_interrupt() local
194 if ((status.xlda) && (lsm6dso->handler_drdy_acc != NULL)) { in lsm6dso_handle_interrupt()
195 lsm6dso->handler_drdy_acc(dev, lsm6dso->trig_drdy_acc); in lsm6dso_handle_interrupt()
198 if ((status.gda) && (lsm6dso->handler_drdy_gyr != NULL)) { in lsm6dso_handle_interrupt()
199 lsm6dso->handler_drdy_gyr(dev, lsm6dso->trig_drdy_gyr); in lsm6dso_handle_interrupt()
203 if ((status.tda) && (lsm6dso->handler_drdy_temp != NULL)) { in lsm6dso_handle_interrupt()
204 lsm6dso->handler_drdy_temp(dev, lsm6dso->trig_drdy_temp); in lsm6dso_handle_interrupt()
216 struct lsm6dso_data *lsm6dso = in lsm6dso_gpio_callback() local
218 const struct lsm6dso_config *cfg = lsm6dso->dev->config; in lsm6dso_gpio_callback()
225 k_sem_give(&lsm6dso->gpio_sem); in lsm6dso_gpio_callback()
227 k_work_submit(&lsm6dso->work); in lsm6dso_gpio_callback()
237 struct lsm6dso_data *lsm6dso = p1; in lsm6dso_thread() local
240 k_sem_take(&lsm6dso->gpio_sem, K_FOREVER); in lsm6dso_thread()
241 lsm6dso_handle_interrupt(lsm6dso->dev); in lsm6dso_thread()
249 struct lsm6dso_data *lsm6dso = in lsm6dso_work_cb() local
252 lsm6dso_handle_interrupt(lsm6dso->dev); in lsm6dso_work_cb()
258 struct lsm6dso_data *lsm6dso = dev->data; in lsm6dso_init_interrupt() local
270 k_sem_init(&lsm6dso->gpio_sem, 0, K_SEM_MAX_LIMIT); in lsm6dso_init_interrupt()
272 k_thread_create(&lsm6dso->thread, lsm6dso->thread_stack, in lsm6dso_init_interrupt()
274 lsm6dso_thread, lsm6dso, in lsm6dso_init_interrupt()
277 k_thread_name_set(&lsm6dso->thread, "lsm6dso"); in lsm6dso_init_interrupt()
279 lsm6dso->work.handler = lsm6dso_work_cb; in lsm6dso_init_interrupt()
288 gpio_init_callback(&lsm6dso->gpio_cb, in lsm6dso_init_interrupt()
292 if (gpio_add_callback(cfg->gpio_drdy.port, &lsm6dso->gpio_cb) < 0) { in lsm6dso_init_interrupt()