Lines Matching refs:iis2mdc
23 struct iis2mdc_data *iis2mdc = dev->data; in iis2mdc_enable_int() local
26 return iis2mdc_drdy_on_pin_set(iis2mdc->ctx, enable); in iis2mdc_enable_int()
34 struct iis2mdc_data *iis2mdc = dev->data; in iis2mdc_trigger_set() local
38 iis2mdc->handler_drdy = handler; in iis2mdc_trigger_set()
39 iis2mdc->trig_drdy = trig; in iis2mdc_trigger_set()
42 iis2mdc_magnetic_raw_get(iis2mdc->ctx, raw); in iis2mdc_trigger_set()
56 struct iis2mdc_data *iis2mdc = dev->data; in iis2mdc_handle_interrupt() local
59 if (iis2mdc->handler_drdy != NULL) { in iis2mdc_handle_interrupt()
60 iis2mdc->handler_drdy(dev, iis2mdc->trig_drdy); in iis2mdc_handle_interrupt()
70 struct iis2mdc_data *iis2mdc = in iis2mdc_gpio_callback() local
72 const struct iis2mdc_dev_config *const config = iis2mdc->dev->config; in iis2mdc_gpio_callback()
79 k_sem_give(&iis2mdc->gpio_sem); in iis2mdc_gpio_callback()
81 k_work_submit(&iis2mdc->work); in iis2mdc_gpio_callback()
91 struct iis2mdc_data *iis2mdc = p1; in iis2mdc_thread() local
94 k_sem_take(&iis2mdc->gpio_sem, K_FOREVER); in iis2mdc_thread()
95 iis2mdc_handle_interrupt(iis2mdc->dev); in iis2mdc_thread()
103 struct iis2mdc_data *iis2mdc = in iis2mdc_work_cb() local
106 iis2mdc_handle_interrupt(iis2mdc->dev); in iis2mdc_work_cb()
112 struct iis2mdc_data *iis2mdc = dev->data; in iis2mdc_init_interrupt() local
123 k_sem_init(&iis2mdc->gpio_sem, 0, K_SEM_MAX_LIMIT); in iis2mdc_init_interrupt()
124 k_thread_create(&iis2mdc->thread, iis2mdc->thread_stack, in iis2mdc_init_interrupt()
126 iis2mdc_thread, iis2mdc, in iis2mdc_init_interrupt()
130 iis2mdc->work.handler = iis2mdc_work_cb; in iis2mdc_init_interrupt()
139 gpio_init_callback(&iis2mdc->gpio_cb, in iis2mdc_init_interrupt()
143 if (gpio_add_callback(config->gpio_drdy.port, &iis2mdc->gpio_cb) < 0) { in iis2mdc_init_interrupt()