tests: drivers: use POST_KERNEL level
There's no need to use APPLICATION level. In case of the IPM console test, priorities have been adjusted to make sure sender/receiver are initialized in the correct order. Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
This commit is contained in:
parent
ee0f8d8381
commit
c0e6e1167b
|
@ -24,7 +24,8 @@
|
||||||
#define DEST IPM_CONSOLE_STDOUT
|
#define DEST IPM_CONSOLE_STDOUT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INIT_PRIO_IPM_SEND 50
|
#define INIT_PRIO_IPM_SEND 40
|
||||||
|
#define INIT_PRIO_IPM_RECV 50
|
||||||
|
|
||||||
extern struct ipm_driver_api ipm_dummy_api;
|
extern struct ipm_driver_api ipm_dummy_api;
|
||||||
|
|
||||||
|
@ -44,7 +45,7 @@ static struct ipm_console_sender_config_info sender_config = {
|
||||||
};
|
};
|
||||||
DEVICE_DEFINE(ipm_console_send0, "ipm_send0", ipm_console_sender_init,
|
DEVICE_DEFINE(ipm_console_send0, "ipm_send0", ipm_console_sender_init,
|
||||||
NULL, NULL, &sender_config,
|
NULL, NULL, &sender_config,
|
||||||
APPLICATION, INIT_PRIO_IPM_SEND, NULL);
|
POST_KERNEL, INIT_PRIO_IPM_SEND, NULL);
|
||||||
|
|
||||||
/* Receiving side of the console IPM driver. These numbers are
|
/* Receiving side of the console IPM driver. These numbers are
|
||||||
* more or less arbitrary
|
* more or less arbitrary
|
||||||
|
@ -70,7 +71,7 @@ static struct ipm_console_receiver_config_info receiver_config = {
|
||||||
struct ipm_console_receiver_runtime_data receiver_data;
|
struct ipm_console_receiver_runtime_data receiver_data;
|
||||||
DEVICE_DEFINE(ipm_console_recv0, "ipm_recv0", ipm_console_receiver_init,
|
DEVICE_DEFINE(ipm_console_recv0, "ipm_recv0", ipm_console_receiver_init,
|
||||||
NULL, &receiver_data, &receiver_config,
|
NULL, &receiver_data, &receiver_config,
|
||||||
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, NULL);
|
POST_KERNEL, INIT_PRIO_IPM_RECV, NULL);
|
||||||
|
|
||||||
static const char thestr[] = "everything is awesome\n";
|
static const char thestr[] = "everything is awesome\n";
|
||||||
|
|
||||||
|
|
|
@ -178,9 +178,9 @@ static const struct sensor_driver_api dummy_sensor_no_trig_api = {
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_DEFINE(dummy_sensor, DUMMY_SENSOR_NAME, &dummy_sensor_init,
|
DEVICE_DEFINE(dummy_sensor, DUMMY_SENSOR_NAME, &dummy_sensor_init,
|
||||||
NULL, &dummy_data, &dummy_config, APPLICATION,
|
NULL, &dummy_data, &dummy_config, POST_KERNEL,
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &dummy_sensor_api);
|
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &dummy_sensor_api);
|
||||||
|
|
||||||
DEVICE_DEFINE(dummy_sensor_no_trig, DUMMY_SENSOR_NAME_NO_TRIG, &dummy_sensor_init,
|
DEVICE_DEFINE(dummy_sensor_no_trig, DUMMY_SENSOR_NAME_NO_TRIG, &dummy_sensor_init,
|
||||||
NULL, &dummy_data, &dummy_config, APPLICATION,
|
NULL, &dummy_data, &dummy_config, POST_KERNEL,
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &dummy_sensor_no_trig_api);
|
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &dummy_sensor_no_trig_api);
|
||||||
|
|
|
@ -101,7 +101,7 @@ static struct pch_config pch_config_data = {
|
||||||
};
|
};
|
||||||
|
|
||||||
DEVICE_DEFINE(dummy_driver, SMBUS_EMUL, &pch_smbus_init,
|
DEVICE_DEFINE(dummy_driver, SMBUS_EMUL, &pch_smbus_init,
|
||||||
NULL, &smbus_data, &pch_config_data, APPLICATION,
|
NULL, &smbus_data, &pch_config_data, POST_KERNEL,
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &funcs);
|
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT, &funcs);
|
||||||
|
|
||||||
ZTEST(test_smbus_emul, test_byte)
|
ZTEST(test_smbus_emul, test_byte)
|
||||||
|
|
Loading…
Reference in a new issue