drivers: regulator: convert to dt device defines
Use the devicetree node as the source of object name and other information used when defining the device structure. Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
This commit is contained in:
parent
63043bc5ac
commit
d9e45b579a
1 changed files with 4 additions and 5 deletions
|
@ -386,10 +386,9 @@ static const struct driver_config regulator_##id##_cfg = { \
|
|||
\
|
||||
static struct REG_DATA_TAG(id) regulator_##id##_data; \
|
||||
\
|
||||
DEVICE_AND_API_INIT(regulator_##id, DT_INST_LABEL(id), \
|
||||
REG_INIT(id), \
|
||||
®ulator_##id##_data, ®ulator_##id##_cfg, \
|
||||
POST_KERNEL, CONFIG_REGULATOR_FIXED_INIT_PRIORITY, \
|
||||
®_API(id));
|
||||
DEVICE_DT_DEFINE(DT_DRV_INST(id), REG_INIT(id), device_pm_control_nop, \
|
||||
®ulator_##id##_data, ®ulator_##id##_cfg, \
|
||||
POST_KERNEL, CONFIG_REGULATOR_FIXED_INIT_PRIORITY, \
|
||||
®_API(id));
|
||||
|
||||
DT_INST_FOREACH_STATUS_OKAY(REGULATOR_DEVICE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue