include/linux/framer/framer-provider.h
Source file repositories/reference/linux-study-clean/include/linux/framer/framer-provider.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/framer/framer-provider.h- Extension
.h- Size
- 5714 bytes
- Lines
- 194
- 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/export.hlinux/framer/framer.hlinux/types.h
Detected Declarations
struct framer_opsstruct framer_providerfunction framer_set_drvdatafunction framer_destroyfunction __framer_provider_of_registerfunction framer_provider_of_unregisterfunction framer_notify_status_change
Annotated Snippet
struct framer_ops {
int (*init)(struct framer *framer);
void (*exit)(struct framer *framer);
int (*power_on)(struct framer *framer);
int (*power_off)(struct framer *framer);
/**
* @get_status:
*
* Optional.
*
* Used to get the framer status. framer_init() must have
* been called on the framer.
*
* Returns: 0 if successful, an negative error code otherwise
*/
int (*get_status)(struct framer *framer, struct framer_status *status);
/**
* @set_config:
*
* Optional.
*
* Used to set the framer configuration. framer_init() must have
* been called on the framer.
*
* Returns: 0 if successful, an negative error code otherwise
*/
int (*set_config)(struct framer *framer, const struct framer_config *config);
/**
* @get_config:
*
* Optional.
*
* Used to get the framer configuration. framer_init() must have
* been called on the framer.
*
* Returns: 0 if successful, an negative error code otherwise
*/
int (*get_config)(struct framer *framer, struct framer_config *config);
u32 flags;
struct module *owner;
};
/**
* struct framer_provider - represents the framer provider
* @dev: framer provider device
* @owner: the module owner having of_xlate
* @list: to maintain a linked list of framer providers
* @of_xlate: function pointer to obtain framer instance from framer pointer
*/
struct framer_provider {
struct device *dev;
struct module *owner;
struct list_head list;
struct framer * (*of_xlate)(struct device *dev,
const struct of_phandle_args *args);
};
static inline void framer_set_drvdata(struct framer *framer, void *data)
{
dev_set_drvdata(&framer->dev, data);
}
static inline void *framer_get_drvdata(struct framer *framer)
{
return dev_get_drvdata(&framer->dev);
}
#if IS_ENABLED(CONFIG_GENERIC_FRAMER)
/* Create and destroy a framer */
struct framer *framer_create(struct device *dev, struct device_node *node,
const struct framer_ops *ops);
void framer_destroy(struct framer *framer);
/* devm version */
struct framer *devm_framer_create(struct device *dev, struct device_node *node,
const struct framer_ops *ops);
struct framer *framer_provider_simple_of_xlate(struct device *dev,
const struct of_phandle_args *args);
struct framer_provider *
__framer_provider_of_register(struct device *dev, struct module *owner,
struct framer *(*of_xlate)(struct device *dev,
const struct of_phandle_args *args));
Annotation
- Immediate include surface: `linux/export.h`, `linux/framer/framer.h`, `linux/types.h`.
- Detected declarations: `struct framer_ops`, `struct framer_provider`, `function framer_set_drvdata`, `function framer_destroy`, `function __framer_provider_of_register`, `function framer_provider_of_unregister`, `function framer_notify_status_change`.
- 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.