include/linux/reset.h
Source file repositories/reference/linux-study-clean/include/linux/reset.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/reset.h- Extension
.h- Size
- 39383 bytes
- Lines
- 1075
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/err.hlinux/errno.hlinux/of.hlinux/types.h
Detected Declarations
struct devicestruct device_nodestruct fwnode_handlestruct reset_controlstruct reset_control_bulk_dataenum reset_control_flagsfunction reset_control_resetfunction reset_control_rearmfunction reset_control_assertfunction reset_control_deassertfunction reset_control_statusfunction reset_control_acquirefunction reset_control_releasefunction reset_control_bulk_resetfunction reset_control_bulk_assertfunction reset_control_bulk_deassertfunction reset_control_bulk_acquirefunction reset_control_bulk_releasefunction reset_control_bulk_putfunction __devm_reset_control_bulk_getfunction devm_reset_control_array_getfunction fwnode_reset_control_array_getfunction reset_control_get_countfunction device_resetfunction device_reset_optionalfunction IS_ERRfunction reset_control_bulk_get_exclusivefunction IS_ERRfunction reset_control_bulk_acquirefunction reset_control_bulk_get_exclusive_releasedfunction IS_ERRfunction reset_control_bulk_get_sharedfunction reset_control_get_exclusivefunction reset_control_bulk_get_exclusivefunction reset_control_get_sharedfunction reset_control_bulk_get_sharedfunction IS_ERRfunction of_reset_control_get_exclusivefunction onlyfunction onlyfunction reset_control_get_exclusivefunction reset_control_get_exclusivefunction reset_control_bulk_get_exclusivefunction reset_control_get_exclusive_releasedfunction reset_control_bulk_get_exclusive_releasedfunction reset_control_get_optional_exclusive_releasedfunction reset_control_bulk_optional_get_exclusive_releasedfunction reset_control_get_shared
Annotated Snippet
struct reset_control_bulk_data {
const char *id;
struct reset_control *rstc;
};
#define RESET_CONTROL_FLAGS_BIT_SHARED BIT(0) /* not exclusive */
#define RESET_CONTROL_FLAGS_BIT_OPTIONAL BIT(1)
#define RESET_CONTROL_FLAGS_BIT_ACQUIRED BIT(2) /* iff exclusive, not released */
#define RESET_CONTROL_FLAGS_BIT_DEASSERTED BIT(3)
/**
* enum reset_control_flags - Flags that can be passed to the reset_control_get functions
* to determine the type of reset control.
* These values cannot be OR'd.
*
* @RESET_CONTROL_EXCLUSIVE: exclusive, acquired,
* @RESET_CONTROL_EXCLUSIVE_DEASSERTED: exclusive, acquired, deasserted
* @RESET_CONTROL_EXCLUSIVE_RELEASED: exclusive, released,
* @RESET_CONTROL_SHARED: shared
* @RESET_CONTROL_SHARED_DEASSERTED: shared, deasserted
* @RESET_CONTROL_OPTIONAL_EXCLUSIVE: optional, exclusive, acquired
* @RESET_CONTROL_OPTIONAL_EXCLUSIVE_DEASSERTED: optional, exclusive, acquired, deasserted
* @RESET_CONTROL_OPTIONAL_EXCLUSIVE_RELEASED: optional, exclusive, released
* @RESET_CONTROL_OPTIONAL_SHARED: optional, shared
* @RESET_CONTROL_OPTIONAL_SHARED_DEASSERTED: optional, shared, deasserted
*/
enum reset_control_flags {
RESET_CONTROL_EXCLUSIVE = RESET_CONTROL_FLAGS_BIT_ACQUIRED,
RESET_CONTROL_EXCLUSIVE_DEASSERTED = RESET_CONTROL_FLAGS_BIT_ACQUIRED |
RESET_CONTROL_FLAGS_BIT_DEASSERTED,
RESET_CONTROL_EXCLUSIVE_RELEASED = 0,
RESET_CONTROL_SHARED = RESET_CONTROL_FLAGS_BIT_SHARED,
RESET_CONTROL_SHARED_DEASSERTED = RESET_CONTROL_FLAGS_BIT_SHARED |
RESET_CONTROL_FLAGS_BIT_DEASSERTED,
RESET_CONTROL_OPTIONAL_EXCLUSIVE = RESET_CONTROL_FLAGS_BIT_OPTIONAL |
RESET_CONTROL_FLAGS_BIT_ACQUIRED,
RESET_CONTROL_OPTIONAL_EXCLUSIVE_DEASSERTED = RESET_CONTROL_FLAGS_BIT_OPTIONAL |
RESET_CONTROL_FLAGS_BIT_ACQUIRED |
RESET_CONTROL_FLAGS_BIT_DEASSERTED,
RESET_CONTROL_OPTIONAL_EXCLUSIVE_RELEASED = RESET_CONTROL_FLAGS_BIT_OPTIONAL,
RESET_CONTROL_OPTIONAL_SHARED = RESET_CONTROL_FLAGS_BIT_OPTIONAL |
RESET_CONTROL_FLAGS_BIT_SHARED,
RESET_CONTROL_OPTIONAL_SHARED_DEASSERTED = RESET_CONTROL_FLAGS_BIT_OPTIONAL |
RESET_CONTROL_FLAGS_BIT_SHARED |
RESET_CONTROL_FLAGS_BIT_DEASSERTED,
};
#ifdef CONFIG_RESET_CONTROLLER
int reset_control_reset(struct reset_control *rstc);
int reset_control_rearm(struct reset_control *rstc);
int reset_control_assert(struct reset_control *rstc);
int reset_control_deassert(struct reset_control *rstc);
int reset_control_status(struct reset_control *rstc);
int reset_control_acquire(struct reset_control *rstc);
void reset_control_release(struct reset_control *rstc);
int reset_control_bulk_reset(int num_rstcs, struct reset_control_bulk_data *rstcs);
int reset_control_bulk_assert(int num_rstcs, struct reset_control_bulk_data *rstcs);
int reset_control_bulk_deassert(int num_rstcs, struct reset_control_bulk_data *rstcs);
int reset_control_bulk_acquire(int num_rstcs, struct reset_control_bulk_data *rstcs);
void reset_control_bulk_release(int num_rstcs, struct reset_control_bulk_data *rstcs);
struct reset_control *__fwnode_reset_control_get(struct fwnode_handle *fwnode,
const char *id, int index, enum reset_control_flags flags);
struct reset_control *__reset_control_get(struct device *dev, const char *id,
int index, enum reset_control_flags flags);
void reset_control_put(struct reset_control *rstc);
int __reset_control_bulk_get(struct device *dev, int num_rstcs,
struct reset_control_bulk_data *rstcs,
enum reset_control_flags flags);
void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs);
int __device_reset(struct device *dev, bool optional);
struct reset_control *__devm_reset_control_get(struct device *dev,
const char *id, int index, enum reset_control_flags flags);
int __devm_reset_control_bulk_get(struct device *dev, int num_rstcs,
struct reset_control_bulk_data *rstcs,
enum reset_control_flags flags);
struct reset_control *devm_reset_control_array_get(struct device *dev,
enum reset_control_flags flags);
struct reset_control *fwnode_reset_control_array_get(struct fwnode_handle *fwnode,
enum reset_control_flags);
int reset_control_get_count(struct device *dev);
#else
static inline int reset_control_reset(struct reset_control *rstc)
Annotation
- Immediate include surface: `linux/bits.h`, `linux/err.h`, `linux/errno.h`, `linux/of.h`, `linux/types.h`.
- Detected declarations: `struct device`, `struct device_node`, `struct fwnode_handle`, `struct reset_control`, `struct reset_control_bulk_data`, `enum reset_control_flags`, `function reset_control_reset`, `function reset_control_rearm`, `function reset_control_assert`, `function reset_control_deassert`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.