Lines Matching refs:stts22h
29 struct stts22h_data *stts22h = dev->data; in stts22h_trigger_set() local
42 stts22h->thsld_handler = handler; in stts22h_trigger_set()
43 stts22h->thsld_trigger = trig; in stts22h_trigger_set()
54 struct stts22h_data *stts22h = dev->data; in stts22h_handle_interrupt() local
61 if (stts22h->thsld_handler != NULL && in stts22h_handle_interrupt()
63 stts22h->thsld_handler(dev, stts22h->thsld_trigger); in stts22h_handle_interrupt()
72 struct stts22h_data *stts22h = in stts22h_gpio_callback() local
74 const struct stts22h_config *cfg = stts22h->dev->config; in stts22h_gpio_callback()
81 k_sem_give(&stts22h->gpio_sem); in stts22h_gpio_callback()
83 k_work_submit(&stts22h->work); in stts22h_gpio_callback()
93 struct stts22h_data *stts22h = p1; in stts22h_thread() local
96 k_sem_take(&stts22h->gpio_sem, K_FOREVER); in stts22h_thread()
97 stts22h_handle_interrupt(stts22h->dev); in stts22h_thread()
105 struct stts22h_data *stts22h = in stts22h_work_cb() local
108 stts22h_handle_interrupt(stts22h->dev); in stts22h_work_cb()
114 struct stts22h_data *stts22h = dev->data; in stts22h_init_interrupt() local
125 k_sem_init(&stts22h->gpio_sem, 0, K_SEM_MAX_LIMIT); in stts22h_init_interrupt()
127 k_thread_create(&stts22h->thread, stts22h->thread_stack, in stts22h_init_interrupt()
129 stts22h_thread, stts22h, in stts22h_init_interrupt()
132 k_thread_name_set(&stts22h->thread, dev->name); in stts22h_init_interrupt()
134 stts22h->work.handler = stts22h_work_cb; in stts22h_init_interrupt()
143 gpio_init_callback(&stts22h->gpio_cb, stts22h_gpio_callback, BIT(cfg->int_gpio.pin)); in stts22h_init_interrupt()
145 if (gpio_add_callback(cfg->int_gpio.port, &stts22h->gpio_cb) < 0) { in stts22h_init_interrupt()