doc: remove references to device_pm_control_nop
Remove it from examples and from PM reference. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
d51acd4e88
commit
70fc2dc8f8
3 changed files with 6 additions and 18 deletions
|
@ -465,7 +465,7 @@ using instance numbers. Do this after defining ``my_api_funcs``.
|
|||
}; \
|
||||
DEVICE_DT_INST_DEFINE(inst, \
|
||||
my_dev_init_function, \
|
||||
device_pm_control_nop, \
|
||||
NULL, \
|
||||
&my_data_##inst, \
|
||||
&my_cfg_##inst, \
|
||||
MY_DEV_INIT_LEVEL, MY_DEV_INIT_PRIORITY, \
|
||||
|
@ -542,7 +542,7 @@ devicetree to operate on specific device nodes:
|
|||
static const struct my_dev_cfg my_cfg_##idx = { /* ... */ }; \
|
||||
DEVICE_DT_DEFINE(MYDEV(idx), \
|
||||
my_dev_init_function, \
|
||||
device_pm_control_nop, \
|
||||
NULL, \
|
||||
&my_data_##idx, \
|
||||
&my_cfg_##idx, \
|
||||
MY_DEV_INIT_LEVEL, MY_DEV_INIT_PRIORITY, \
|
||||
|
|
|
@ -326,7 +326,7 @@ Then when the particular instance is declared:
|
|||
static struct my_data_0;
|
||||
|
||||
DEVICE_DEFINE(my_driver_0, MY_DRIVER_0_NAME, my_driver_init,
|
||||
device_pm_control_nop, &my_data_0, &my_driver_config_0,
|
||||
NULL, &my_data_0, &my_driver_config_0,
|
||||
POST_KERNEL, MY_DRIVER_0_PRIORITY, &my_api_funcs);
|
||||
|
||||
#endif /* CONFIG_MY_DRIVER_0 */
|
||||
|
|
|
@ -264,21 +264,9 @@ Device Model with Power Management Support
|
|||
Drivers initialize the devices using macros. See :ref:`device_model_api` for
|
||||
details on how these macros are used. Use the DEVICE_DEFINE macro to initialize
|
||||
drivers providing power management support via the PM control function.
|
||||
One of the macro parameters is the pointer to the device_pm_control handler function.
|
||||
|
||||
Default Initializer Function
|
||||
----------------------------
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
int device_pm_control_nop(const struct device *unused_device, uint32_t unused_ctrl_command, void *unused_context);
|
||||
|
||||
|
||||
If the driver doesn't implement any power control operations, the driver can
|
||||
initialize the corresponding pointer with this default nop function. This
|
||||
default nop function does nothing and should be used instead of
|
||||
implementing a dummy function to avoid wasting code memory in the driver.
|
||||
|
||||
One of the macro parameters is the pointer to the device_pm_control handler
|
||||
function. If the driver doesn't implement any power control operations, it can
|
||||
initialize the corresponding pointer with ``NULL``.
|
||||
|
||||
Device Power Management API
|
||||
===========================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue