diff --git a/drivers/sensor/adt7310/adt7310_trigger.c b/drivers/sensor/adt7310/adt7310_trigger.c index 25d264f5768..be989a69910 100644 --- a/drivers/sensor/adt7310/adt7310_trigger.c +++ b/drivers/sensor/adt7310/adt7310_trigger.c @@ -30,8 +30,13 @@ static void adt7310_gpio_callback(const struct device *dev, struct gpio_callback } #if defined(CONFIG_ADT7310_TRIGGER_OWN_THREAD) -static void adt7310_thread(struct adt7310_data *drv_data) +static void adt7310_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct adt7310_data *drv_data = p1; + while (true) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); if (drv_data->th_handler != NULL) { @@ -125,7 +130,7 @@ int adt7310_init_interrupt(const struct device *dev) k_sem_init(&drv_data->gpio_sem, 0, 1); k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_ADT7310_THREAD_STACK_SIZE, - (k_thread_entry_t)adt7310_thread, drv_data, + adt7310_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_ADT7310_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_ADT7310_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/adt7420/adt7420_trigger.c b/drivers/sensor/adt7420/adt7420_trigger.c index 00065eab586..1a26903adc7 100644 --- a/drivers/sensor/adt7420/adt7420_trigger.c +++ b/drivers/sensor/adt7420/adt7420_trigger.c @@ -76,8 +76,13 @@ static void adt7420_gpio_callback(const struct device *dev, } #if defined(CONFIG_ADT7420_TRIGGER_OWN_THREAD) -static void adt7420_thread(struct adt7420_data *drv_data) +static void adt7420_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct adt7420_data *drv_data = p1; + while (true) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); process_int(drv_data->dev); @@ -162,7 +167,7 @@ int adt7420_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_ADT7420_THREAD_STACK_SIZE, - (k_thread_entry_t)adt7420_thread, drv_data, + adt7420_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_ADT7420_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_ADT7420_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/adxl362/adxl362_trigger.c b/drivers/sensor/adxl362/adxl362_trigger.c index ba30c0a1826..341e6dad04d 100644 --- a/drivers/sensor/adxl362/adxl362_trigger.c +++ b/drivers/sensor/adxl362/adxl362_trigger.c @@ -62,8 +62,13 @@ static void adxl362_gpio_callback(const struct device *dev, } #if defined(CONFIG_ADXL362_TRIGGER_OWN_THREAD) -static void adxl362_thread(struct adxl362_data *drv_data) +static void adxl362_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct adxl362_data *drv_data = p1; + while (true) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); adxl362_thread_cb(drv_data->dev); @@ -171,7 +176,7 @@ int adxl362_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_ADXL362_THREAD_STACK_SIZE, - (k_thread_entry_t)adxl362_thread, drv_data, + adxl362_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_ADXL362_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_ADXL362_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/adxl372/adxl372_trigger.c b/drivers/sensor/adxl372/adxl372_trigger.c index adc3d0ba1f7..2d9cca6cfd8 100644 --- a/drivers/sensor/adxl372/adxl372_trigger.c +++ b/drivers/sensor/adxl372/adxl372_trigger.c @@ -69,8 +69,13 @@ static void adxl372_gpio_callback(const struct device *dev, } #if defined(CONFIG_ADXL372_TRIGGER_OWN_THREAD) -static void adxl372_thread(struct adxl372_data *drv_data) +static void adxl372_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct adxl372_data *drv_data = p1; + while (true) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); adxl372_thread_cb(drv_data->dev); @@ -177,7 +182,7 @@ int adxl372_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_ADXL372_THREAD_STACK_SIZE, - (k_thread_entry_t)adxl372_thread, drv_data, + adxl372_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_ADXL372_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_ADXL372_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/amg88xx/amg88xx_trigger.c b/drivers/sensor/amg88xx/amg88xx_trigger.c index fa1e237edab..7b8d4979ec8 100644 --- a/drivers/sensor/amg88xx/amg88xx_trigger.c +++ b/drivers/sensor/amg88xx/amg88xx_trigger.c @@ -113,8 +113,13 @@ static void amg88xx_thread_cb(const struct device *dev) } #ifdef CONFIG_AMG88XX_TRIGGER_OWN_THREAD -static void amg88xx_thread(struct amg88xx_data *drv_data) +static void amg88xx_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct amg88xx_data *drv_data = p1; + while (42) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); amg88xx_thread_cb(drv_data->dev); @@ -196,7 +201,7 @@ int amg88xx_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_AMG88XX_THREAD_STACK_SIZE, - (k_thread_entry_t)amg88xx_thread, drv_data, + amg88xx_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_AMG88XX_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_AMG88XX_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/bma280/bma280_trigger.c b/drivers/sensor/bma280/bma280_trigger.c index a20ce6dc853..5c39950b49f 100644 --- a/drivers/sensor/bma280/bma280_trigger.c +++ b/drivers/sensor/bma280/bma280_trigger.c @@ -127,8 +127,13 @@ static void bma280_thread_cb(const struct device *dev) } #ifdef CONFIG_BMA280_TRIGGER_OWN_THREAD -static void bma280_thread(struct bma280_data *drv_data) +static void bma280_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct bma280_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); bma280_thread_cb(drv_data->dev); @@ -281,7 +286,7 @@ int bma280_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_BMA280_THREAD_STACK_SIZE, - (k_thread_entry_t)bma280_thread, drv_data, + bma280_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_BMA280_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_BMA280_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c b/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c index c51d965bc51..230b5daa8ae 100644 --- a/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c +++ b/drivers/sensor/bmc150_magn/bmc150_magn_trigger.c @@ -81,8 +81,12 @@ static void bmc150_magn_gpio_drdy_callback(const struct device *dev, k_sem_give(&data->sem); } -static void bmc150_magn_thread_main(struct bmc150_magn_data *data) +static void bmc150_magn_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct bmc150_magn_data *data = p1; const struct bmc150_magn_config *config = data->dev->config; uint8_t reg_val; @@ -145,7 +149,7 @@ int bmc150_magn_init_interrupt(const struct device *dev) k_thread_create(&data->thread, data->thread_stack, CONFIG_BMC150_MAGN_TRIGGER_THREAD_STACK, - (k_thread_entry_t)bmc150_magn_thread_main, + bmc150_magn_thread_main, data, NULL, NULL, K_PRIO_COOP(10), 0, K_NO_WAIT); diff --git a/drivers/sensor/bmg160/bmg160_trigger.c b/drivers/sensor/bmg160/bmg160_trigger.c index c4c7696cf3e..dc6946e7ee9 100644 --- a/drivers/sensor/bmg160/bmg160_trigger.c +++ b/drivers/sensor/bmg160/bmg160_trigger.c @@ -181,8 +181,13 @@ static void bmg160_handle_int(const struct device *dev) static K_KERNEL_STACK_DEFINE(bmg160_thread_stack, CONFIG_BMG160_THREAD_STACK_SIZE); static struct k_thread bmg160_thread; -static void bmg160_thread_main(struct bmg160_device_data *bmg160) +static void bmg160_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct bmg160_device_data *bmg160 = p1; + while (true) { k_sem_take(&bmg160->trig_sem, K_FOREVER); @@ -245,7 +250,7 @@ int bmg160_trigger_init(const struct device *dev) k_sem_init(&bmg160->trig_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&bmg160_thread, bmg160_thread_stack, CONFIG_BMG160_THREAD_STACK_SIZE, - (k_thread_entry_t)bmg160_thread_main, + bmg160_thread_main, bmg160, NULL, NULL, K_PRIO_COOP(CONFIG_BMG160_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/bmi160/bmi160_trigger.c b/drivers/sensor/bmi160/bmi160_trigger.c index 3110977427e..3cb870f1285 100644 --- a/drivers/sensor/bmi160/bmi160_trigger.c +++ b/drivers/sensor/bmi160/bmi160_trigger.c @@ -71,8 +71,10 @@ static void bmi160_handle_interrupts(const struct device *dev) static K_KERNEL_STACK_DEFINE(bmi160_thread_stack, CONFIG_BMI160_THREAD_STACK_SIZE); static struct k_thread bmi160_thread; -static void bmi160_thread_main(struct bmi160_data *data) +static void bmi160_thread_main(void *p1, void *p2, void *p3) { + struct bmi160_data *data = p1; + while (1) { k_sem_take(&data->sem, K_FOREVER); bmi160_handle_interrupts(data->dev); @@ -276,7 +278,7 @@ int bmi160_trigger_mode_init(const struct device *dev) k_thread_create(&bmi160_thread, bmi160_thread_stack, CONFIG_BMI160_THREAD_STACK_SIZE, - (k_thread_entry_t)bmi160_thread_main, + bmi160_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_BMI160_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/bmi270/bmi270_trigger.c b/drivers/sensor/bmi270/bmi270_trigger.c index 1fc21b14251..656b5d23d16 100644 --- a/drivers/sensor/bmi270/bmi270_trigger.c +++ b/drivers/sensor/bmi270/bmi270_trigger.c @@ -85,8 +85,13 @@ static void bmi270_thread_cb(const struct device *dev) } #ifdef CONFIG_BMI270_TRIGGER_OWN_THREAD -static void bmi270_thread(struct bmi270_data *data) +static void bmi270_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct bmi270_data *data = p1; + while (1) { k_sem_take(&data->trig_sem, K_FOREVER); bmi270_thread_cb(data->dev); @@ -173,7 +178,7 @@ int bmi270_init_interrupts(const struct device *dev) #if CONFIG_BMI270_TRIGGER_OWN_THREAD k_sem_init(&data->trig_sem, 0, 1); k_thread_create(&data->thread, data->thread_stack, CONFIG_BMI270_THREAD_STACK_SIZE, - (k_thread_entry_t)bmi270_thread, data, NULL, NULL, + bmi270_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_BMI270_THREAD_PRIORITY), 0, K_NO_WAIT); #elif CONFIG_BMI270_TRIGGER_GLOBAL_THREAD k_work_init(&data->trig_work, bmi270_trig_work_cb); diff --git a/drivers/sensor/bq274xx/bq274xx_trigger.c b/drivers/sensor/bq274xx/bq274xx_trigger.c index 9b276f3b5ff..40f20e8b955 100644 --- a/drivers/sensor/bq274xx/bq274xx_trigger.c +++ b/drivers/sensor/bq274xx/bq274xx_trigger.c @@ -31,8 +31,13 @@ static void bq274xx_handle_interrupts(const struct device *dev) static K_KERNEL_STACK_DEFINE(bq274xx_thread_stack, CONFIG_BQ274XX_THREAD_STACK_SIZE); static struct k_thread bq274xx_thread; -static void bq274xx_thread_main(struct bq274xx_data *data) +static void bq274xx_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct bq274xx_data *data = p1; + while (1) { k_sem_take(&data->sem, K_FOREVER); bq274xx_handle_interrupts(data->dev); @@ -79,7 +84,7 @@ int bq274xx_trigger_mode_init(const struct device *dev) k_thread_create(&bq274xx_thread, bq274xx_thread_stack, CONFIG_BQ274XX_THREAD_STACK_SIZE, - (k_thread_entry_t)bq274xx_thread_main, + bq274xx_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_BQ274XX_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/ccs811/ccs811_trigger.c b/drivers/sensor/ccs811/ccs811_trigger.c index 29750bd6bb3..5a7ef006d01 100644 --- a/drivers/sensor/ccs811/ccs811_trigger.c +++ b/drivers/sensor/ccs811/ccs811_trigger.c @@ -98,8 +98,13 @@ static void gpio_callback(const struct device *dev, } #ifdef CONFIG_CCS811_TRIGGER_OWN_THREAD -static void irq_thread(struct ccs811_data *drv_data) +static void irq_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct ccs811_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); process_irq(drv_data->dev); @@ -192,7 +197,7 @@ int ccs811_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_CCS811_THREAD_STACK_SIZE, - (k_thread_entry_t)irq_thread, drv_data, + irq_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_CCS811_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_CCS811_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/fdc2x1x/fdc2x1x_trigger.c b/drivers/sensor/fdc2x1x/fdc2x1x_trigger.c index 61697d24605..519d5af0d61 100644 --- a/drivers/sensor/fdc2x1x/fdc2x1x_trigger.c +++ b/drivers/sensor/fdc2x1x/fdc2x1x_trigger.c @@ -60,8 +60,13 @@ static void fdc2x1x_gpio_callback(const struct device *dev, } #ifdef CONFIG_FDC2X1X_TRIGGER_OWN_THREAD -static void fdc2x1x_thread(struct fdc2x1x_data *drv_data) +static void fdc2x1x_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct fdc2x1x_data *drv_data = p1; + while (true) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); fdc2x1x_thread_cb(drv_data->dev); @@ -158,7 +163,7 @@ int fdc2x1x_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_FDC2X1X_THREAD_STACK_SIZE, - (k_thread_entry_t)fdc2x1x_thread, + fdc2x1x_thread, drv_data, 0, NULL, K_PRIO_COOP(CONFIG_FDC2X1X_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/fxas21002/fxas21002_trigger.c b/drivers/sensor/fxas21002/fxas21002_trigger.c index 966ed5e2cba..b32d2f5f7d0 100644 --- a/drivers/sensor/fxas21002/fxas21002_trigger.c +++ b/drivers/sensor/fxas21002/fxas21002_trigger.c @@ -68,8 +68,13 @@ static void fxas21002_handle_int(const struct device *dev) } #ifdef CONFIG_FXAS21002_TRIGGER_OWN_THREAD -static void fxas21002_thread_main(struct fxas21002_data *data) +static void fxas21002_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct fxas21002_data *data = p1; + while (true) { k_sem_take(&data->trig_sem, K_FOREVER); fxas21002_handle_int(data->dev); @@ -173,7 +178,7 @@ int fxas21002_trigger_init(const struct device *dev) k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_FXAS21002_THREAD_STACK_SIZE, - (k_thread_entry_t)fxas21002_thread_main, data, 0, NULL, + fxas21002_thread_main, data, 0, NULL, K_PRIO_COOP(CONFIG_FXAS21002_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_FXAS21002_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/fxos8700/fxos8700_trigger.c b/drivers/sensor/fxos8700/fxos8700_trigger.c index d9adaf8d38f..53d493ac44d 100644 --- a/drivers/sensor/fxos8700/fxos8700_trigger.c +++ b/drivers/sensor/fxos8700/fxos8700_trigger.c @@ -168,8 +168,13 @@ static void fxos8700_handle_int(const struct device *dev) } #ifdef CONFIG_FXOS8700_TRIGGER_OWN_THREAD -static void fxos8700_thread_main(struct fxos8700_data *data) +static void fxos8700_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct fxos8700_data *data = p1; + while (true) { k_sem_take(&data->trig_sem, K_FOREVER); fxos8700_handle_int(data->dev); @@ -395,7 +400,7 @@ int fxos8700_trigger_init(const struct device *dev) k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_FXOS8700_THREAD_STACK_SIZE, - (k_thread_entry_t)fxos8700_thread_main, + fxos8700_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_FXOS8700_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/grow_r502a/grow_r502a_trigger.c b/drivers/sensor/grow_r502a/grow_r502a_trigger.c index 7f4e97874bd..1513b896d94 100644 --- a/drivers/sensor/grow_r502a/grow_r502a_trigger.c +++ b/drivers/sensor/grow_r502a/grow_r502a_trigger.c @@ -71,8 +71,13 @@ static void grow_r502a_gpio_callback(const struct device *dev, } #if defined(CONFIG_GROW_R502A_TRIGGER_OWN_THREAD) -static void grow_r502a_thread(struct grow_r502a_data *drv_data) +static void grow_r502a_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct grow_r502a_data *drv_data = p1; + while (true) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); process_int(drv_data->gpio_dev); @@ -111,7 +116,7 @@ int grow_r502a_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_GROW_R502A_THREAD_STACK_SIZE, - (k_thread_entry_t)grow_r502a_thread, drv_data, NULL, + grow_r502a_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_GROW_R502A_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_GROW_R502A_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/hmc5883l/hmc5883l_trigger.c b/drivers/sensor/hmc5883l/hmc5883l_trigger.c index da73a10807c..c3a1d00891c 100644 --- a/drivers/sensor/hmc5883l/hmc5883l_trigger.c +++ b/drivers/sensor/hmc5883l/hmc5883l_trigger.c @@ -78,8 +78,13 @@ static void hmc5883l_thread_cb(const struct device *dev) } #ifdef CONFIG_HMC5883L_TRIGGER_OWN_THREAD -static void hmc5883l_thread(struct hmc5883l_data *drv_data) +static void hmc5883l_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct hmc5883l_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); hmc5883l_thread_cb(drv_data->dev); @@ -124,7 +129,7 @@ int hmc5883l_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_HMC5883L_THREAD_STACK_SIZE, - (k_thread_entry_t)hmc5883l_thread, + hmc5883l_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_HMC5883L_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/hts221/hts221_trigger.c b/drivers/sensor/hts221/hts221_trigger.c index 9019706a34b..1ebccb2a3c5 100644 --- a/drivers/sensor/hts221/hts221_trigger.c +++ b/drivers/sensor/hts221/hts221_trigger.c @@ -95,8 +95,13 @@ static void hts221_drdy_callback(const struct device *dev, } #ifdef CONFIG_HTS221_TRIGGER_OWN_THREAD -static void hts221_thread(struct hts221_data *data) +static void hts221_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct hts221_data *data = p1; + while (1) { k_sem_take(&data->drdy_sem, K_FOREVER); process_drdy(data->dev); @@ -163,7 +168,7 @@ int hts221_init_interrupt(const struct device *dev) k_thread_create(&data->thread, data->thread_stack, CONFIG_HTS221_THREAD_STACK_SIZE, - (k_thread_entry_t)hts221_thread, data, + hts221_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_HTS221_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_HTS221_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/iis2dh/iis2dh_trigger.c b/drivers/sensor/iis2dh/iis2dh_trigger.c index edbcf01493b..d108c52c398 100644 --- a/drivers/sensor/iis2dh/iis2dh_trigger.c +++ b/drivers/sensor/iis2dh/iis2dh_trigger.c @@ -112,8 +112,13 @@ static void iis2dh_gpio_callback(const struct device *dev, } #ifdef CONFIG_IIS2DH_TRIGGER_OWN_THREAD -static void iis2dh_thread(struct iis2dh_data *iis2dh) +static void iis2dh_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct iis2dh_data *iis2dh = p1; + while (1) { k_sem_take(&iis2dh->gpio_sem, K_FOREVER); iis2dh_handle_interrupt(iis2dh->dev); @@ -149,7 +154,7 @@ int iis2dh_init_interrupt(const struct device *dev) k_thread_create(&iis2dh->thread, iis2dh->thread_stack, CONFIG_IIS2DH_THREAD_STACK_SIZE, - (k_thread_entry_t)iis2dh_thread, iis2dh, + iis2dh_thread, iis2dh, 0, NULL, K_PRIO_COOP(CONFIG_IIS2DH_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_IIS2DH_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/iis2dlpc/iis2dlpc_trigger.c b/drivers/sensor/iis2dlpc/iis2dlpc_trigger.c index 381e3318aa5..90cdb4b857f 100644 --- a/drivers/sensor/iis2dlpc/iis2dlpc_trigger.c +++ b/drivers/sensor/iis2dlpc/iis2dlpc_trigger.c @@ -233,8 +233,13 @@ static void iis2dlpc_gpio_callback(const struct device *dev, } #ifdef CONFIG_IIS2DLPC_TRIGGER_OWN_THREAD -static void iis2dlpc_thread(struct iis2dlpc_data *iis2dlpc) +static void iis2dlpc_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct iis2dlpc_data *iis2dlpc = p1; + while (1) { k_sem_take(&iis2dlpc->gpio_sem, K_FOREVER); iis2dlpc_handle_interrupt(iis2dlpc->dev); @@ -270,7 +275,7 @@ int iis2dlpc_init_interrupt(const struct device *dev) k_thread_create(&iis2dlpc->thread, iis2dlpc->thread_stack, CONFIG_IIS2DLPC_THREAD_STACK_SIZE, - (k_thread_entry_t)iis2dlpc_thread, iis2dlpc, + iis2dlpc_thread, iis2dlpc, NULL, NULL, K_PRIO_COOP(CONFIG_IIS2DLPC_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_IIS2DLPC_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/iis2iclx/iis2iclx_trigger.c b/drivers/sensor/iis2iclx/iis2iclx_trigger.c index 6360ab69d72..174583c75e7 100644 --- a/drivers/sensor/iis2iclx/iis2iclx_trigger.c +++ b/drivers/sensor/iis2iclx/iis2iclx_trigger.c @@ -182,8 +182,13 @@ static void iis2iclx_gpio_callback(const struct device *dev, } #ifdef CONFIG_IIS2ICLX_TRIGGER_OWN_THREAD -static void iis2iclx_thread(struct iis2iclx_data *iis2iclx) +static void iis2iclx_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct iis2iclx_data *iis2iclx = p1; + while (1) { k_sem_take(&iis2iclx->gpio_sem, K_FOREVER); iis2iclx_handle_interrupt(iis2iclx->dev); @@ -218,7 +223,7 @@ int iis2iclx_init_interrupt(const struct device *dev) k_thread_create(&iis2iclx->thread, iis2iclx->thread_stack, CONFIG_IIS2ICLX_THREAD_STACK_SIZE, - (k_thread_entry_t)iis2iclx_thread, + iis2iclx_thread, iis2iclx, NULL, NULL, K_PRIO_COOP(CONFIG_IIS2ICLX_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/iis2mdc/iis2mdc_trigger.c b/drivers/sensor/iis2mdc/iis2mdc_trigger.c index 049cc5c3b95..fc9f203b033 100644 --- a/drivers/sensor/iis2mdc/iis2mdc_trigger.c +++ b/drivers/sensor/iis2mdc/iis2mdc_trigger.c @@ -83,8 +83,13 @@ static void iis2mdc_gpio_callback(const struct device *dev, } #ifdef CONFIG_IIS2MDC_TRIGGER_OWN_THREAD -static void iis2mdc_thread(struct iis2mdc_data *iis2mdc) +static void iis2mdc_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct iis2mdc_data *iis2mdc = p1; + while (1) { k_sem_take(&iis2mdc->gpio_sem, K_FOREVER); iis2mdc_handle_interrupt(iis2mdc->dev); @@ -118,7 +123,7 @@ int iis2mdc_init_interrupt(const struct device *dev) k_sem_init(&iis2mdc->gpio_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&iis2mdc->thread, iis2mdc->thread_stack, CONFIG_IIS2MDC_THREAD_STACK_SIZE, - (k_thread_entry_t)iis2mdc_thread, iis2mdc, + iis2mdc_thread, iis2mdc, NULL, NULL, K_PRIO_COOP(CONFIG_IIS2MDC_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_IIS2MDC_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/iis3dhhc/iis3dhhc_trigger.c b/drivers/sensor/iis3dhhc/iis3dhhc_trigger.c index ff964e30efc..0ce2df490b3 100644 --- a/drivers/sensor/iis3dhhc/iis3dhhc_trigger.c +++ b/drivers/sensor/iis3dhhc/iis3dhhc_trigger.c @@ -99,8 +99,13 @@ static void iis3dhhc_gpio_callback(const struct device *dev, } #ifdef CONFIG_IIS3DHHC_TRIGGER_OWN_THREAD -static void iis3dhhc_thread(struct iis3dhhc_data *iis3dhhc) +static void iis3dhhc_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct iis3dhhc_data *iis3dhhc = p1; + while (1) { k_sem_take(&iis3dhhc->gpio_sem, K_FOREVER); iis3dhhc_handle_interrupt(iis3dhhc->dev); @@ -136,7 +141,7 @@ int iis3dhhc_init_interrupt(const struct device *dev) k_thread_create(&iis3dhhc->thread, iis3dhhc->thread_stack, CONFIG_IIS3DHHC_THREAD_STACK_SIZE, - (k_thread_entry_t)iis3dhhc_thread, iis3dhhc, + iis3dhhc_thread, iis3dhhc, NULL, NULL, K_PRIO_COOP(CONFIG_IIS3DHHC_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_IIS3DHHC_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/isl29035/isl29035_trigger.c b/drivers/sensor/isl29035/isl29035_trigger.c index db4857917c6..a0a5d2af21f 100644 --- a/drivers/sensor/isl29035/isl29035_trigger.c +++ b/drivers/sensor/isl29035/isl29035_trigger.c @@ -121,8 +121,12 @@ static void isl29035_thread_cb(const struct device *dev) } #ifdef CONFIG_ISL29035_TRIGGER_OWN_THREAD -static void isl29035_thread(const struct device *dev) +static void isl29035_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + const struct device *dev = p1; struct isl29035_driver_data *drv_data = dev->data; while (1) { @@ -205,7 +209,7 @@ int isl29035_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_ISL29035_THREAD_STACK_SIZE, - (k_thread_entry_t)isl29035_thread, + isl29035_thread, (void *)dev, NULL, NULL, K_PRIO_COOP(CONFIG_ISL29035_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/ism330dhcx/ism330dhcx_trigger.c b/drivers/sensor/ism330dhcx/ism330dhcx_trigger.c index 788313b85c5..ac4c16b9506 100644 --- a/drivers/sensor/ism330dhcx/ism330dhcx_trigger.c +++ b/drivers/sensor/ism330dhcx/ism330dhcx_trigger.c @@ -226,8 +226,13 @@ static void ism330dhcx_gpio_callback(const struct device *dev, } #ifdef CONFIG_ISM330DHCX_TRIGGER_OWN_THREAD -static void ism330dhcx_thread(struct ism330dhcx_data *ism330dhcx) +static void ism330dhcx_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct ism330dhcx_data *ism330dhcx = p1; + while (1) { k_sem_take(&ism330dhcx->gpio_sem, K_FOREVER); ism330dhcx_handle_interrupt(ism330dhcx->dev); @@ -261,7 +266,7 @@ int ism330dhcx_init_interrupt(const struct device *dev) k_thread_create(&ism330dhcx->thread, ism330dhcx->thread_stack, CONFIG_ISM330DHCX_THREAD_STACK_SIZE, - (k_thread_entry_t)ism330dhcx_thread, + ism330dhcx_thread, ism330dhcx, NULL, NULL, K_PRIO_COOP(CONFIG_ISM330DHCX_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/lis2dh/lis2dh_trigger.c b/drivers/sensor/lis2dh/lis2dh_trigger.c index 2b773b2aef8..d0d3ad38dab 100644 --- a/drivers/sensor/lis2dh/lis2dh_trigger.c +++ b/drivers/sensor/lis2dh/lis2dh_trigger.c @@ -506,8 +506,13 @@ static void lis2dh_thread_cb(const struct device *dev) } #ifdef CONFIG_LIS2DH_TRIGGER_OWN_THREAD -static void lis2dh_thread(struct lis2dh_data *lis2dh) +static void lis2dh_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lis2dh_data *lis2dh = p1; + while (1) { k_sem_take(&lis2dh->gpio_sem, K_FOREVER); lis2dh_thread_cb(lis2dh->dev); @@ -538,7 +543,7 @@ int lis2dh_init_interrupt(const struct device *dev) k_sem_init(&lis2dh->gpio_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&lis2dh->thread, lis2dh->thread_stack, CONFIG_LIS2DH_THREAD_STACK_SIZE, - (k_thread_entry_t)lis2dh_thread, lis2dh, NULL, NULL, + lis2dh_thread, lis2dh, NULL, NULL, K_PRIO_COOP(CONFIG_LIS2DH_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_LIS2DH_TRIGGER_GLOBAL_THREAD) lis2dh->work.handler = lis2dh_work_cb; diff --git a/drivers/sensor/lis2ds12/lis2ds12_trigger.c b/drivers/sensor/lis2ds12/lis2ds12_trigger.c index 96069419907..d3494913315 100644 --- a/drivers/sensor/lis2ds12/lis2ds12_trigger.c +++ b/drivers/sensor/lis2ds12/lis2ds12_trigger.c @@ -67,8 +67,13 @@ static void lis2ds12_handle_int(const struct device *dev) } #ifdef CONFIG_LIS2DS12_TRIGGER_OWN_THREAD -static void lis2ds12_thread(struct lis2ds12_data *data) +static void lis2ds12_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lis2ds12_data *data = p1; + while (1) { k_sem_take(&data->trig_sem, K_FOREVER); lis2ds12_handle_int(data->dev); @@ -159,7 +164,7 @@ int lis2ds12_trigger_init(const struct device *dev) k_thread_create(&data->thread, data->thread_stack, CONFIG_LIS2DS12_THREAD_STACK_SIZE, - (k_thread_entry_t)lis2ds12_thread, + lis2ds12_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_LIS2DS12_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/lis2dw12/lis2dw12_trigger.c b/drivers/sensor/lis2dw12/lis2dw12_trigger.c index 08030c993b6..e30d6d4c167 100644 --- a/drivers/sensor/lis2dw12/lis2dw12_trigger.c +++ b/drivers/sensor/lis2dw12/lis2dw12_trigger.c @@ -301,8 +301,13 @@ static void lis2dw12_gpio_callback(const struct device *dev, } #ifdef CONFIG_LIS2DW12_TRIGGER_OWN_THREAD -static void lis2dw12_thread(struct lis2dw12_data *lis2dw12) +static void lis2dw12_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lis2dw12_data *lis2dw12 = p1; + while (1) { k_sem_take(&lis2dw12->gpio_sem, K_FOREVER); lis2dw12_handle_interrupt(lis2dw12->dev); @@ -451,7 +456,7 @@ int lis2dw12_init_interrupt(const struct device *dev) k_thread_create(&lis2dw12->thread, lis2dw12->thread_stack, CONFIG_LIS2DW12_THREAD_STACK_SIZE, - (k_thread_entry_t)lis2dw12_thread, lis2dw12, + lis2dw12_thread, lis2dw12, NULL, NULL, K_PRIO_COOP(CONFIG_LIS2DW12_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_LIS2DW12_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/lis2mdl/lis2mdl_trigger.c b/drivers/sensor/lis2mdl/lis2mdl_trigger.c index 4a77e2fa432..19930174ea0 100644 --- a/drivers/sensor/lis2mdl/lis2mdl_trigger.c +++ b/drivers/sensor/lis2mdl/lis2mdl_trigger.c @@ -96,8 +96,13 @@ static void lis2mdl_gpio_callback(const struct device *dev, } #ifdef CONFIG_LIS2MDL_TRIGGER_OWN_THREAD -static void lis2mdl_thread(struct lis2mdl_data *lis2mdl) +static void lis2mdl_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lis2mdl_data *lis2mdl = p1; + while (1) { k_sem_take(&lis2mdl->gpio_sem, K_FOREVER); lis2mdl_handle_interrupt(lis2mdl->dev); @@ -131,7 +136,7 @@ int lis2mdl_init_interrupt(const struct device *dev) k_sem_init(&lis2mdl->gpio_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&lis2mdl->thread, lis2mdl->thread_stack, CONFIG_LIS2MDL_THREAD_STACK_SIZE, - (k_thread_entry_t)lis2mdl_thread, lis2mdl, + lis2mdl_thread, lis2mdl, NULL, NULL, K_PRIO_COOP(CONFIG_LIS2MDL_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_LIS2MDL_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/lis3mdl/lis3mdl_trigger.c b/drivers/sensor/lis3mdl/lis3mdl_trigger.c index 05993e1ceda..ba94076bd14 100644 --- a/drivers/sensor/lis3mdl/lis3mdl_trigger.c +++ b/drivers/sensor/lis3mdl/lis3mdl_trigger.c @@ -87,8 +87,13 @@ static void lis3mdl_thread_cb(const struct device *dev) } #ifdef CONFIG_LIS3MDL_TRIGGER_OWN_THREAD -static void lis3mdl_thread(struct lis3mdl_data *drv_data) +static void lis3mdl_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lis3mdl_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); lis3mdl_thread_cb(drv_data->dev); @@ -140,7 +145,7 @@ int lis3mdl_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_LIS3MDL_THREAD_STACK_SIZE, - (k_thread_entry_t)lis3mdl_thread, drv_data, + lis3mdl_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_LIS3MDL_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_LIS3MDL_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/lps22hh/lps22hh_trigger.c b/drivers/sensor/lps22hh/lps22hh_trigger.c index bb8c7f406ef..e08a0259ee2 100644 --- a/drivers/sensor/lps22hh/lps22hh_trigger.c +++ b/drivers/sensor/lps22hh/lps22hh_trigger.c @@ -123,8 +123,13 @@ static void lps22hh_gpio_callback(const struct device *dev, } #ifdef CONFIG_LPS22HH_TRIGGER_OWN_THREAD -static void lps22hh_thread(struct lps22hh_data *lps22hh) +static void lps22hh_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lps22hh_data *lps22hh = p1; + while (1) { k_sem_take(&lps22hh->intr_sem, K_FOREVER); lps22hh_handle_interrupt(lps22hh->dev); @@ -187,7 +192,7 @@ int lps22hh_init_interrupt(const struct device *dev) k_thread_create(&lps22hh->thread, lps22hh->thread_stack, CONFIG_LPS22HH_THREAD_STACK_SIZE, - (k_thread_entry_t)lps22hh_thread, lps22hh, + lps22hh_thread, lps22hh, NULL, NULL, K_PRIO_COOP(CONFIG_LPS22HH_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_LPS22HH_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c b/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c index b84464cb396..989d322678e 100644 --- a/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c +++ b/drivers/sensor/lsm6dsl/lsm6dsl_trigger.c @@ -97,8 +97,12 @@ static void lsm6dsl_thread_cb(const struct device *dev) } #ifdef CONFIG_LSM6DSL_TRIGGER_OWN_THREAD -static void lsm6dsl_thread(const struct device *dev) +static void lsm6dsl_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + const struct device *dev = p1; struct lsm6dsl_data *drv_data = dev->data; while (1) { @@ -156,7 +160,7 @@ int lsm6dsl_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_LSM6DSL_THREAD_STACK_SIZE, - (k_thread_entry_t)lsm6dsl_thread, (void *)dev, + lsm6dsl_thread, (void *)dev, NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSL_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_LSM6DSL_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/lsm6dso/lsm6dso_trigger.c b/drivers/sensor/lsm6dso/lsm6dso_trigger.c index 8181c91c604..8f8bc527282 100644 --- a/drivers/sensor/lsm6dso/lsm6dso_trigger.c +++ b/drivers/sensor/lsm6dso/lsm6dso_trigger.c @@ -228,8 +228,13 @@ static void lsm6dso_gpio_callback(const struct device *dev, } #ifdef CONFIG_LSM6DSO_TRIGGER_OWN_THREAD -static void lsm6dso_thread(struct lsm6dso_data *lsm6dso) +static void lsm6dso_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lsm6dso_data *lsm6dso = p1; + while (1) { k_sem_take(&lsm6dso->gpio_sem, K_FOREVER); lsm6dso_handle_interrupt(lsm6dso->dev); @@ -265,7 +270,7 @@ int lsm6dso_init_interrupt(const struct device *dev) k_thread_create(&lsm6dso->thread, lsm6dso->thread_stack, CONFIG_LSM6DSO_THREAD_STACK_SIZE, - (k_thread_entry_t)lsm6dso_thread, lsm6dso, + lsm6dso_thread, lsm6dso, NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSO_THREAD_PRIORITY), 0, K_NO_WAIT); k_thread_name_set(&lsm6dso->thread, "lsm6dso"); diff --git a/drivers/sensor/lsm6dso16is/lsm6dso16is_trigger.c b/drivers/sensor/lsm6dso16is/lsm6dso16is_trigger.c index c9bcc313bad..93ce4f6c0b0 100644 --- a/drivers/sensor/lsm6dso16is/lsm6dso16is_trigger.c +++ b/drivers/sensor/lsm6dso16is/lsm6dso16is_trigger.c @@ -256,8 +256,13 @@ static void lsm6dso16is_gpio_callback(const struct device *dev, } #ifdef CONFIG_LSM6DSO16IS_TRIGGER_OWN_THREAD -static void lsm6dso16is_thread(struct lsm6dso16is_data *lsm6dso16is) +static void lsm6dso16is_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lsm6dso16is_data *lsm6dso16is = p1; + while (1) { k_sem_take(&lsm6dso16is->gpio_sem, K_FOREVER); lsm6dso16is_handle_interrupt(lsm6dso16is->dev); @@ -293,7 +298,7 @@ int lsm6dso16is_init_interrupt(const struct device *dev) k_thread_create(&lsm6dso16is->thread, lsm6dso16is->thread_stack, CONFIG_LSM6DSO16IS_THREAD_STACK_SIZE, - (k_thread_entry_t)lsm6dso16is_thread, lsm6dso16is, + lsm6dso16is_thread, lsm6dso16is, NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSO16IS_THREAD_PRIORITY), 0, K_NO_WAIT); k_thread_name_set(&lsm6dso16is->thread, "lsm6dso16is"); diff --git a/drivers/sensor/lsm6dsv16x/lsm6dsv16x_trigger.c b/drivers/sensor/lsm6dsv16x/lsm6dsv16x_trigger.c index b82e371bc9c..a6ab65a550f 100644 --- a/drivers/sensor/lsm6dsv16x/lsm6dsv16x_trigger.c +++ b/drivers/sensor/lsm6dsv16x/lsm6dsv16x_trigger.c @@ -256,8 +256,13 @@ static void lsm6dsv16x_gpio_callback(const struct device *dev, } #ifdef CONFIG_LSM6DSV16X_TRIGGER_OWN_THREAD -static void lsm6dsv16x_thread(struct lsm6dsv16x_data *lsm6dsv16x) +static void lsm6dsv16x_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct lsm6dsv16x_data *lsm6dsv16x = p1; + while (1) { k_sem_take(&lsm6dsv16x->gpio_sem, K_FOREVER); lsm6dsv16x_handle_interrupt(lsm6dsv16x->dev); @@ -293,7 +298,7 @@ int lsm6dsv16x_init_interrupt(const struct device *dev) k_thread_create(&lsm6dsv16x->thread, lsm6dsv16x->thread_stack, CONFIG_LSM6DSV16X_THREAD_STACK_SIZE, - (k_thread_entry_t)lsm6dsv16x_thread, lsm6dsv16x, + lsm6dsv16x_thread, lsm6dsv16x, NULL, NULL, K_PRIO_COOP(CONFIG_LSM6DSV16X_THREAD_PRIORITY), 0, K_NO_WAIT); k_thread_name_set(&lsm6dsv16x->thread, "lsm6dsv16x"); diff --git a/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro_trigger.c b/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro_trigger.c index 35a46032406..08441deff79 100644 --- a/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro_trigger.c +++ b/drivers/sensor/lsm9ds0_gyro/lsm9ds0_gyro_trigger.c @@ -80,8 +80,12 @@ static void lsm9ds0_gyro_gpio_drdy_callback(const struct device *dev, k_sem_give(&data->sem); } -static void lsm9ds0_gyro_thread_main(const struct device *dev) +static void lsm9ds0_gyro_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + const struct device *dev = p1; struct lsm9ds0_gyro_data *data = dev->data; while (1) { @@ -106,7 +110,7 @@ int lsm9ds0_gyro_init_interrupt(const struct device *dev) k_thread_create(&data->thread, data->thread_stack, CONFIG_LSM9DS0_GYRO_THREAD_STACK_SIZE, - (k_thread_entry_t)lsm9ds0_gyro_thread_main, + lsm9ds0_gyro_thread_main, (void *)dev, NULL, NULL, K_PRIO_COOP(10), 0, K_NO_WAIT); if (!gpio_is_ready_dt(&config->int_gpio)) { diff --git a/drivers/sensor/mcp9808/mcp9808_trigger.c b/drivers/sensor/mcp9808/mcp9808_trigger.c index 627f77f04b5..6c42661d073 100644 --- a/drivers/sensor/mcp9808/mcp9808_trigger.c +++ b/drivers/sensor/mcp9808/mcp9808_trigger.c @@ -129,8 +129,13 @@ static void alert_cb(const struct device *dev, struct gpio_callback *cb, #ifdef CONFIG_MCP9808_TRIGGER_OWN_THREAD -static void mcp9808_thread_main(struct mcp9808_data *data) +static void mcp9808_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct mcp9808_data *data = p1; + while (true) { k_sem_take(&data->sem, K_FOREVER); process_int(data->dev); @@ -169,7 +174,7 @@ int mcp9808_setup_interrupt(const struct device *dev) k_thread_create(&mcp9808_thread, mcp9808_thread_stack, CONFIG_MCP9808_THREAD_STACK_SIZE, - (k_thread_entry_t)mcp9808_thread_main, data, NULL, NULL, + mcp9808_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_MCP9808_THREAD_PRIORITY), 0, K_NO_WAIT); #else /* CONFIG_MCP9808_TRIGGER_GLOBAL_THREAD */ diff --git a/drivers/sensor/mpu6050/mpu6050_trigger.c b/drivers/sensor/mpu6050/mpu6050_trigger.c index 5415dbe1f41..69d45ea0182 100644 --- a/drivers/sensor/mpu6050/mpu6050_trigger.c +++ b/drivers/sensor/mpu6050/mpu6050_trigger.c @@ -77,8 +77,13 @@ static void mpu6050_thread_cb(const struct device *dev) } #ifdef CONFIG_MPU6050_TRIGGER_OWN_THREAD -static void mpu6050_thread(struct mpu6050_data *drv_data) +static void mpu6050_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct mpu6050_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); mpu6050_thread_cb(drv_data->dev); @@ -131,7 +136,7 @@ int mpu6050_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_MPU6050_THREAD_STACK_SIZE, - (k_thread_entry_t)mpu6050_thread, drv_data, + mpu6050_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_MPU6050_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_MPU6050_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/mpu9250/mpu9250_trigger.c b/drivers/sensor/mpu9250/mpu9250_trigger.c index fdfeb016b19..5619bfb50dc 100644 --- a/drivers/sensor/mpu9250/mpu9250_trigger.c +++ b/drivers/sensor/mpu9250/mpu9250_trigger.c @@ -94,8 +94,13 @@ static void mpu9250_thread_cb(const struct device *dev) } #ifdef CONFIG_MPU9250_TRIGGER_OWN_THREAD -static void mpu9250_thread(struct mpu9250_data *drv_data) +static void mpu9250_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct mpu9250_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); mpu9250_thread_cb(drv_data->dev); @@ -160,7 +165,7 @@ int mpu9250_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_MPU9250_THREAD_STACK_SIZE, - (k_thread_entry_t)mpu9250_thread, drv_data, + mpu9250_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_MPU9250_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_MPU9250_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/sht3xd/sht3xd_trigger.c b/drivers/sensor/sht3xd/sht3xd_trigger.c index 03b2bffaea4..b6b398c5166 100644 --- a/drivers/sensor/sht3xd/sht3xd_trigger.c +++ b/drivers/sensor/sht3xd/sht3xd_trigger.c @@ -162,8 +162,13 @@ static void sht3xd_thread_cb(const struct device *dev) } #ifdef CONFIG_SHT3XD_TRIGGER_OWN_THREAD -static void sht3xd_thread(struct sht3xd_data *data) +static void sht3xd_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct sht3xd_data *data = p1; + while (1) { k_sem_take(&data->gpio_sem, K_FOREVER); sht3xd_thread_cb(data->dev); @@ -238,7 +243,7 @@ int sht3xd_init_interrupt(const struct device *dev) k_thread_create(&data->thread, data->thread_stack, CONFIG_SHT3XD_THREAD_STACK_SIZE, - (k_thread_entry_t)sht3xd_thread, data, + sht3xd_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_SHT3XD_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_SHT3XD_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/sm351lt/sm351lt.c b/drivers/sensor/sm351lt/sm351lt.c index 0663079ca89..7ec83253152 100644 --- a/drivers/sensor/sm351lt/sm351lt.c +++ b/drivers/sensor/sm351lt/sm351lt.c @@ -212,7 +212,7 @@ static int sm351lt_init(const struct device *dev) k_thread_create(&data->thread, data->thread_stack, CONFIG_SM351LT_THREAD_STACK_SIZE, - (k_thread_entry_t)sm351lt_thread, data, NULL, + sm351lt_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_SM351LT_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/stts751/stts751_trigger.c b/drivers/sensor/stts751/stts751_trigger.c index ec463370c56..5d827d4f1b1 100644 --- a/drivers/sensor/stts751/stts751_trigger.c +++ b/drivers/sensor/stts751/stts751_trigger.c @@ -96,8 +96,13 @@ static void stts751_gpio_callback(const struct device *dev, } #ifdef CONFIG_STTS751_TRIGGER_OWN_THREAD -static void stts751_thread(struct stts751_data *stts751) +static void stts751_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct stts751_data *stts751 = p1; + while (1) { k_sem_take(&stts751->gpio_sem, K_FOREVER); stts751_handle_interrupt(stts751->dev); @@ -131,7 +136,7 @@ int stts751_init_interrupt(const struct device *dev) k_thread_create(&stts751->thread, stts751->thread_stack, CONFIG_STTS751_THREAD_STACK_SIZE, - (k_thread_entry_t)stts751_thread, stts751, + stts751_thread, stts751, NULL, NULL, K_PRIO_COOP(CONFIG_STTS751_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_STTS751_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/sx9500/sx9500_trigger.c b/drivers/sensor/sx9500/sx9500_trigger.c index 127291b2a91..146e6753ef9 100644 --- a/drivers/sensor/sx9500/sx9500_trigger.c +++ b/drivers/sensor/sx9500/sx9500_trigger.c @@ -98,8 +98,13 @@ static void sx9500_gpio_cb(const struct device *port, k_sem_give(&data->sem); } -static void sx9500_thread_main(struct sx9500_data *data) +static void sx9500_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct sx9500_data *data = p1; + while (1) { k_sem_take(&data->sem, K_FOREVER); sx9500_gpio_thread_cb(data->dev); @@ -170,7 +175,7 @@ int sx9500_setup_interrupt(const struct device *dev) #ifdef CONFIG_SX9500_TRIGGER_OWN_THREAD k_thread_create(&sx9500_thread, sx9500_thread_stack, CONFIG_SX9500_THREAD_STACK_SIZE, - (k_thread_entry_t)sx9500_thread_main, data, 0, NULL, + sx9500_thread_main, data, 0, NULL, K_PRIO_COOP(CONFIG_SX9500_THREAD_PRIORITY), 0, K_NO_WAIT); #endif diff --git a/drivers/sensor/tcn75a/tcn75a_trigger.c b/drivers/sensor/tcn75a/tcn75a_trigger.c index 90f6932a9e0..12635eb00c2 100644 --- a/drivers/sensor/tcn75a/tcn75a_trigger.c +++ b/drivers/sensor/tcn75a/tcn75a_trigger.c @@ -149,8 +149,13 @@ static void tcn75a_gpio_callback(const struct device *dev, struct gpio_callback } #ifdef CONFIG_TCN75A_TRIGGER_OWN_THREAD -static void tcn75a_thread_main(struct tcn75a_data *data) +static void tcn75a_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct tcn75a_data *data = p1; + while (true) { k_sem_take(&data->trig_sem, K_FOREVER); tcn75a_handle_int(data->dev); @@ -193,7 +198,7 @@ int tcn75a_trigger_init(const struct device *dev) #if defined(CONFIG_TCN75A_TRIGGER_OWN_THREAD) k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_TCN75A_THREAD_STACK_SIZE, - (k_thread_entry_t)tcn75a_thread_main, data, NULL, NULL, + tcn75a_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_TCN75A_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_TCN75A_TRIGGER_GLOBAL_THREAD) data->work.handler = tcn75a_work_handler; diff --git a/drivers/sensor/tmp007/tmp007_trigger.c b/drivers/sensor/tmp007/tmp007_trigger.c index d123a68aabc..a3eb0b07303 100644 --- a/drivers/sensor/tmp007/tmp007_trigger.c +++ b/drivers/sensor/tmp007/tmp007_trigger.c @@ -105,8 +105,13 @@ static void tmp007_thread_cb(const struct device *dev) } #ifdef CONFIG_TMP007_TRIGGER_OWN_THREAD -static void tmp007_thread(struct tmp007_data *drv_data) +static void tmp007_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct tmp007_data *drv_data = p1; + while (1) { k_sem_take(&drv_data->gpio_sem, K_FOREVER); tmp007_thread_cb(drv_data->dev); @@ -185,7 +190,7 @@ int tmp007_init_interrupt(const struct device *dev) k_thread_create(&drv_data->thread, drv_data->thread_stack, CONFIG_TMP007_THREAD_STACK_SIZE, - (k_thread_entry_t)tmp007_thread, drv_data, + tmp007_thread, drv_data, NULL, NULL, K_PRIO_COOP(CONFIG_TMP007_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_TMP007_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/tsl2540/tsl2540_trigger.c b/drivers/sensor/tsl2540/tsl2540_trigger.c index c383186e77c..3251c3a45c9 100644 --- a/drivers/sensor/tsl2540/tsl2540_trigger.c +++ b/drivers/sensor/tsl2540/tsl2540_trigger.c @@ -81,8 +81,13 @@ static void tsl2540_process_int(const struct device *dev) } #ifdef CONFIG_TSL2540_TRIGGER_OWN_THREAD -static void tsl2540_thread_main(struct tsl2540_data *data) +static void tsl2540_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct tsl2540_data *data = p1; + while (true) { k_sem_take(&data->trig_sem, K_FOREVER); tsl2540_process_int(data->dev); @@ -189,7 +194,7 @@ int tsl2540_trigger_init(const struct device *dev) #if defined(CONFIG_TSL2540_TRIGGER_OWN_THREAD) k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_TSL2540_THREAD_STACK_SIZE, - (k_thread_entry_t)tsl2540_thread_main, data, NULL, NULL, + tsl2540_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_TSL2540_THREAD_PRIORITY), 0, K_NO_WAIT); k_thread_name_set(&data->thread, "TSL2540 trigger"); #elif defined(CONFIG_TSL2540_TRIGGER_GLOBAL_THREAD) diff --git a/drivers/sensor/vcnl4040/vcnl4040_trigger.c b/drivers/sensor/vcnl4040/vcnl4040_trigger.c index f47d70d0b39..f2680b0b8be 100644 --- a/drivers/sensor/vcnl4040/vcnl4040_trigger.c +++ b/drivers/sensor/vcnl4040/vcnl4040_trigger.c @@ -86,8 +86,13 @@ static void vcnl4040_handle_int(const struct device *dev) } #ifdef CONFIG_VCNL4040_TRIGGER_OWN_THREAD -static void vcnl4040_thread_main(struct vcnl4040_data *data) +static void vcnl4040_thread_main(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct vcnl4040_data *data = p1; + while (true) { k_sem_take(&data->trig_sem, K_FOREVER); vcnl4040_handle_int(data->dev); @@ -266,7 +271,7 @@ int vcnl4040_trigger_init(const struct device *dev) k_sem_init(&data->trig_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_VCNL4040_THREAD_STACK_SIZE, - (k_thread_entry_t)vcnl4040_thread_main, + vcnl4040_thread_main, data, NULL, NULL, K_PRIO_COOP(CONFIG_VCNL4040_THREAD_PRIORITY), 0, K_NO_WAIT); diff --git a/drivers/sensor/wsen_hids/wsen_hids_trigger.c b/drivers/sensor/wsen_hids/wsen_hids_trigger.c index 2de3b04c821..e8c9472f5cd 100644 --- a/drivers/sensor/wsen_hids/wsen_hids_trigger.c +++ b/drivers/sensor/wsen_hids/wsen_hids_trigger.c @@ -89,8 +89,13 @@ static void hids_drdy_callback(const struct device *dev, struct gpio_callback *c } #ifdef CONFIG_WSEN_HIDS_TRIGGER_OWN_THREAD -static void hids_thread(struct hids_data *data) +static void hids_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct hids_data *data = p1; + while (true) { k_sem_take(&data->drdy_sem, K_FOREVER); hids_process_drdy_interrupt(data->dev); @@ -151,7 +156,7 @@ int hids_init_interrupt(const struct device *dev) k_sem_init(&data->drdy_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_WSEN_HIDS_THREAD_STACK_SIZE, - (k_thread_entry_t)hids_thread, data, NULL, NULL, + hids_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_WSEN_HIDS_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_WSEN_HIDS_TRIGGER_GLOBAL_THREAD) data->work.handler = hids_work_cb; diff --git a/drivers/sensor/wsen_pads/wsen_pads_trigger.c b/drivers/sensor/wsen_pads/wsen_pads_trigger.c index a00fae8de16..13394e23d9a 100644 --- a/drivers/sensor/wsen_pads/wsen_pads_trigger.c +++ b/drivers/sensor/wsen_pads/wsen_pads_trigger.c @@ -112,8 +112,13 @@ static void pads_drdy_callback(const struct device *dev, struct gpio_callback *c } #ifdef CONFIG_WSEN_PADS_TRIGGER_OWN_THREAD -static void pads_thread(struct pads_data *data) +static void pads_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct pads_data *data = p1; + while (true) { k_sem_take(&data->drdy_sem, K_FOREVER); pads_process_drdy_interrupt(data->dev); @@ -168,7 +173,7 @@ int pads_init_interrupt(const struct device *dev) k_sem_init(&data->drdy_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_WSEN_PADS_THREAD_STACK_SIZE, - (k_thread_entry_t)pads_thread, data, NULL, NULL, + pads_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_WSEN_PADS_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_WSEN_PADS_TRIGGER_GLOBAL_THREAD) data->work.handler = pads_work_cb; diff --git a/drivers/sensor/wsen_tids/wsen_tids_trigger.c b/drivers/sensor/wsen_tids/wsen_tids_trigger.c index 9b7837d2a9a..d2ed4d91fef 100644 --- a/drivers/sensor/wsen_tids/wsen_tids_trigger.c +++ b/drivers/sensor/wsen_tids/wsen_tids_trigger.c @@ -118,8 +118,13 @@ static void tids_threshold_callback(const struct device *dev, struct gpio_callba } #ifdef CONFIG_WSEN_TIDS_TRIGGER_OWN_THREAD -static void tids_thread(struct tids_data *tids) +static void tids_thread(void *p1, void *p2, void *p3) { + ARG_UNUSED(p2); + ARG_UNUSED(p3); + + struct tids_data *tids = p1; + while (true) { k_sem_take(&tids->threshold_sem, K_FOREVER); tids_process_threshold_interrupt(tids->dev); @@ -226,7 +231,7 @@ int tids_init_interrupt(const struct device *dev) k_sem_init(&data->threshold_sem, 0, K_SEM_MAX_LIMIT); k_thread_create(&data->thread, data->thread_stack, CONFIG_WSEN_TIDS_THREAD_STACK_SIZE, - (k_thread_entry_t)tids_thread, data, NULL, NULL, + tids_thread, data, NULL, NULL, K_PRIO_COOP(CONFIG_WSEN_TIDS_THREAD_PRIORITY), 0, K_NO_WAIT); #elif defined(CONFIG_WSEN_TIDS_TRIGGER_GLOBAL_THREAD) data->work.handler = tids_work_cb;