Lines Matching full:lps22hh
1 /* ST Microelectronics LPS22HH pressure and temperature sensor
8 * https://www.st.com/resource/en/datasheet/lps22hh.pdf
18 #include "lps22hh.h"
20 LOG_MODULE_DECLARE(LPS22HH, CONFIG_SENSOR_LOG_LEVEL);
44 struct lps22hh_data *lps22hh = dev->data; in lps22hh_trigger_set() local
50 lps22hh->handler_drdy = handler; in lps22hh_trigger_set()
51 lps22hh->data_ready_trigger = trig; in lps22hh_trigger_set()
74 struct lps22hh_data *lps22hh = dev->data; in lps22hh_handle_interrupt() local
77 if (lps22hh->handler_drdy != NULL) { in lps22hh_handle_interrupt()
78 lps22hh->handler_drdy(dev, lps22hh->data_ready_trigger); in lps22hh_handle_interrupt()
98 static void lps22hh_intr_callback(struct lps22hh_data *lps22hh) in lps22hh_intr_callback() argument
101 k_sem_give(&lps22hh->intr_sem); in lps22hh_intr_callback()
103 k_work_submit(&lps22hh->work); in lps22hh_intr_callback()
110 struct lps22hh_data *lps22hh = in lps22hh_gpio_callback() local
114 const struct lps22hh_config *cfg = lps22hh->dev->config; in lps22hh_gpio_callback()
122 lps22hh_intr_callback(lps22hh); in lps22hh_gpio_callback()
131 struct lps22hh_data *lps22hh = p1; in lps22hh_thread() local
134 k_sem_take(&lps22hh->intr_sem, K_FOREVER); in lps22hh_thread()
135 lps22hh_handle_interrupt(lps22hh->dev); in lps22hh_thread()
143 struct lps22hh_data *lps22hh = in lps22hh_work_cb() local
146 lps22hh_handle_interrupt(lps22hh->dev); in lps22hh_work_cb()
155 struct lps22hh_data *lps22hh = dev->data; in lps22hh_ibi_cb() local
159 lps22hh_intr_callback(lps22hh); in lps22hh_ibi_cb()
167 struct lps22hh_data *lps22hh = dev->data; in lps22hh_init_interrupt() local
188 lps22hh->dev = dev; in lps22hh_init_interrupt()
191 k_sem_init(&lps22hh->intr_sem, 0, K_SEM_MAX_LIMIT); in lps22hh_init_interrupt()
193 k_thread_create(&lps22hh->thread, lps22hh->thread_stack, in lps22hh_init_interrupt()
195 lps22hh_thread, lps22hh, in lps22hh_init_interrupt()
199 lps22hh->work.handler = lps22hh_work_cb; in lps22hh_init_interrupt()
215 gpio_init_callback(&lps22hh->gpio_cb, in lps22hh_init_interrupt()
219 ret = gpio_add_callback(cfg->gpio_int.port, &lps22hh->gpio_cb); in lps22hh_init_interrupt()
234 lps22hh->i3c_dev->ibi_cb = lps22hh_ibi_cb; in lps22hh_init_interrupt()
236 if (i3c_ibi_enable(lps22hh->i3c_dev) != 0) { in lps22hh_init_interrupt()