| 
    Zephyr Project API
    3.3.0
    
   A Scalable Open Source RTOS 
   | 
 
Reset Controller Interface. More...
Data Structures | |
| struct | reset_dt_spec | 
Macros | |
| #define | RESET_DT_SPEC_GET_BY_IDX(node_id, idx) | 
Static initializer for a reset_dt_spec.  More... | |
| #define | RESET_DT_SPEC_GET(node_id) RESET_DT_SPEC_GET_BY_IDX(node_id, 0) | 
| Equivalent to RESET_DT_SPEC_GET_BY_IDX(node_id, 0).  More... | |
| #define | RESET_DT_SPEC_INST_GET_BY_IDX(inst, idx) RESET_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), idx) | 
Static initializer for a reset_dt_spec from a DT_DRV_COMPAT instance's Reset Controller property at an index.  More... | |
| #define | RESET_DT_SPEC_INST_GET(inst) RESET_DT_SPEC_INST_GET_BY_IDX(inst, 0) | 
| Equivalent to RESET_DT_SPEC_INST_GET_BY_IDX(inst, 0).  More... | |
Functions | |
| int | reset_status (const struct device *dev, uint32_t id, uint8_t *status) | 
| Get the reset status.  More... | |
| static int | reset_status_dt (const struct reset_dt_spec *spec, uint8_t *status) | 
Get the reset status from a reset_dt_spec.  More... | |
| int | reset_line_assert (const struct device *dev, uint32_t id) | 
| Put the device in reset state.  More... | |
| static int | reset_line_assert_dt (const struct reset_dt_spec *spec) | 
Assert the reset state from a reset_dt_spec.  More... | |
| int | reset_line_deassert (const struct device *dev, uint32_t id) | 
| Take out the device from reset state.  More... | |
| static int | reset_line_deassert_dt (const struct reset_dt_spec *spec) | 
Deassert the reset state from a reset_dt_spec.  More... | |
| int | reset_line_toggle (const struct device *dev, uint32_t id) | 
| Reset the device.  More... | |
| static int | reset_line_toggle_dt (const struct reset_dt_spec *spec) | 
Reset the device from a reset_dt_spec.  More... | |
Reset Controller Interface.
| #define RESET_DT_SPEC_GET | ( | node_id | ) | RESET_DT_SPEC_GET_BY_IDX(node_id, 0) | 
#include <include/zephyr/drivers/reset.h>
Equivalent to RESET_DT_SPEC_GET_BY_IDX(node_id, 0).
| node_id | devicetree node identifier | 
| #define RESET_DT_SPEC_GET_BY_IDX | ( | node_id, | |
| idx | |||
| ) | 
#include <include/zephyr/drivers/reset.h>
Static initializer for a reset_dt_spec. 
This returns a static initializer for a reset_dt_spec structure given a devicetree node identifier, a property specifying a Reset Controller and an index.
Example devicetree fragment:
 n: node {
    resets = <&reset 10>;
 }
Example usage:
 const struct reset_dt_spec spec = RESET_DT_SPEC_GET_BY_IDX(DT_NODELABEL(n), 0);
 // Initializes 'spec' to:
 // {
 //         .dev = DEVICE_DT_GET(DT_NODELABEL(reset)),
 //         .id = 10
 // }
The 'reset' field must still be checked for readiness, e.g. using device_is_ready(). It is an error to use this macro unless the node exists, has the given property, and that property specifies a reset controller reset line id as shown above.
| node_id | devicetree node identifier | 
| idx | logical index into "resets" | 
| #define RESET_DT_SPEC_INST_GET | ( | inst | ) | RESET_DT_SPEC_INST_GET_BY_IDX(inst, 0) | 
#include <include/zephyr/drivers/reset.h>
Equivalent to RESET_DT_SPEC_INST_GET_BY_IDX(inst, 0).
| inst | DT_DRV_COMPAT instance number | 
| #define RESET_DT_SPEC_INST_GET_BY_IDX | ( | inst, | |
| idx | |||
| ) | RESET_DT_SPEC_GET_BY_IDX(DT_DRV_INST(inst), idx) | 
#include <include/zephyr/drivers/reset.h>
Static initializer for a reset_dt_spec from a DT_DRV_COMPAT instance's Reset Controller property at an index. 
| inst | DT_DRV_COMPAT instance number | 
| idx | logical index into "resets" | 
#include <include/zephyr/drivers/reset.h>
Put the device in reset state.
This function sets/clears the reset bits of the device, depending on the logic level (active-high/active-low).
| dev | Reset controller device. | 
| id | Reset line. | 
| 0 | On success. | 
| -ENOSYS | If the functionality is not implemented by the driver. | 
| -errno | Other negative errno in case of failure. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/reset.h>
Assert the reset state from a reset_dt_spec. 
This is equivalent to:
reset_line_assert(spec->dev, spec->id);
| spec | Reset controller specification from devicetree | 
#include <include/zephyr/drivers/reset.h>
Take out the device from reset state.
This function sets/clears the reset bits of the device, depending on the logic level (active-low/active-high).
| dev | Reset controller device. | 
| id | Reset line. | 
| 0 | On success. | 
| -ENOSYS | If the functionality is not implemented by the driver. | 
| -errno | Other negative errno in case of failure. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/reset.h>
Deassert the reset state from a reset_dt_spec. 
This is equivalent to:
reset_line_deassert(spec->dev, spec->id)
| spec | Reset controller specification from devicetree | 
#include <include/zephyr/drivers/reset.h>
Reset the device.
This function performs reset for a device (assert + deassert).
| dev | Reset controller device. | 
| id | Reset line. | 
| 0 | On success. | 
| -ENOSYS | If the functionality is not implemented by the driver. | 
| -errno | Other negative errno in case of failure. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/reset.h>
Reset the device from a reset_dt_spec. 
This is equivalent to:
reset_line_toggle(spec->dev, spec->id)
| spec | Reset controller specification from devicetree | 
#include <include/zephyr/drivers/reset.h>
Get the reset status.
This function returns the reset status of the device.
| dev | Reset controller device. | 
| id | Reset line. | 
| status | Where to write the reset status. | 
| 0 | On success. | 
| -ENOSYS | If the functionality is not implemented by the driver. | 
| -errno | Other negative errno in case of failure. | 
      
  | 
  inlinestatic | 
#include <include/zephyr/drivers/reset.h>
Get the reset status from a reset_dt_spec. 
This is equivalent to:
reset_status(spec->dev, spec->id, status);
| spec | Reset controller specification from devicetree | 
| status | Where to write the reset status. |