drivers: sensor: Refactor drivers to use SENSOR_DEVICE_DT_INST_DEFINE
Refactors all sensor drivers to use SENSOR_DEVICE_DT_INST_DEFINE, which is a sensor-specific variant of DEVICE_DT_INST_DEFINE that provides a common place to instantiate additional data structures for the future sensor subsystem and/or sensor driver stats. This approach was inspired by I2C_DEVICE_DT_INST_DEFINE to streamline adding I2C stats support across all I2C drivers. Signed-off-by: Maureen Helm <maureen.helm@intel.com>
This commit is contained in:
parent
9124e310fd
commit
a9b223b26b
112 changed files with 156 additions and 111 deletions
|
@ -295,7 +295,7 @@ static const struct sensor_driver_api fxas21002_driver_api = {
|
|||
{ 0 }),)))) \
|
||||
}; \
|
||||
\
|
||||
DEVICE_DT_INST_DEFINE(inst, fxas21002_init, NULL, \
|
||||
SENSOR_DEVICE_DT_INST_DEFINE(inst, fxas21002_init, NULL, \
|
||||
&fxas21002_data_##inst, &fxas21002_config_##inst, \
|
||||
POST_KERNEL, CONFIG_SENSOR_INIT_PRIORITY, \
|
||||
&fxas21002_driver_api); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue