include/linux/framer/framer.h
Source file repositories/reference/linux-study-clean/include/linux/framer/framer.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/framer/framer.h- Extension
.h- Size
- 5232 bytes
- Lines
- 205
- 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/err.hlinux/mutex.hlinux/notifier.hlinux/of.hlinux/device.hlinux/workqueue.h
Detected Declarations
struct framer_configstruct framer_statusstruct framerenum framer_ifaceenum framer_clock_typeenum framer_eventfunction framer_pm_runtime_getfunction framer_pm_runtime_get_syncfunction framer_pm_runtime_putfunction framer_initfunction framer_exitfunction framer_power_onfunction framer_power_offfunction framer_get_statusfunction framer_get_configfunction framer_set_configfunction framer_notifier_registerfunction framer_notifier_unregisterfunction framer_put
Annotated Snippet
struct framer_config {
enum framer_iface iface;
enum framer_clock_type clock_type;
unsigned long line_clock_rate;
};
/**
* struct framer_status - Framer status
* @link_is_on: Framer link state. true, the link is on, false, the link is off.
*/
struct framer_status {
bool link_is_on;
};
/**
* enum framer_event - Event available for notification
* @FRAMER_EVENT_STATUS: Event notified on framer_status changes
*/
enum framer_event {
FRAMER_EVENT_STATUS,
};
/**
* struct framer - represents the framer device
* @dev: framer device
* @id: id of the framer device
* @ops: function pointers for performing framer operations
* @mutex: mutex to protect framer_ops
* @init_count: used to protect when the framer is used by multiple consumers
* @power_count: used to protect when the framer is used by multiple consumers
* @pwr: power regulator associated with the framer
* @notify_status_work: work structure used for status notifications
* @notifier_list: notifier list used for notifications
* @polling_work: delayed work structure used for the polling task
* @prev_status: previous read status used by the polling task to detect changes
*/
struct framer {
struct device dev;
int id;
const struct framer_ops *ops;
struct mutex mutex; /* Protect framer */
int init_count;
int power_count;
struct regulator *pwr;
struct work_struct notify_status_work;
struct blocking_notifier_head notifier_list;
struct delayed_work polling_work;
struct framer_status prev_status;
};
#if IS_ENABLED(CONFIG_GENERIC_FRAMER)
int framer_pm_runtime_get(struct framer *framer);
int framer_pm_runtime_get_sync(struct framer *framer);
void framer_pm_runtime_put(struct framer *framer);
int framer_pm_runtime_put_sync(struct framer *framer);
int framer_init(struct framer *framer);
int framer_exit(struct framer *framer);
int framer_power_on(struct framer *framer);
int framer_power_off(struct framer *framer);
int framer_get_status(struct framer *framer, struct framer_status *status);
int framer_get_config(struct framer *framer, struct framer_config *config);
int framer_set_config(struct framer *framer, const struct framer_config *config);
int framer_notifier_register(struct framer *framer, struct notifier_block *nb);
int framer_notifier_unregister(struct framer *framer, struct notifier_block *nb);
struct framer *framer_get(struct device *dev, const char *con_id);
void framer_put(struct device *dev, struct framer *framer);
struct framer *devm_framer_get(struct device *dev, const char *con_id);
struct framer *devm_framer_optional_get(struct device *dev, const char *con_id);
#else
static inline int framer_pm_runtime_get(struct framer *framer)
{
return -ENOSYS;
}
static inline int framer_pm_runtime_get_sync(struct framer *framer)
{
return -ENOSYS;
}
static inline void framer_pm_runtime_put(struct framer *framer)
{
}
static inline int framer_pm_runtime_put_sync(struct framer *framer)
{
return -ENOSYS;
}
Annotation
- Immediate include surface: `linux/err.h`, `linux/mutex.h`, `linux/notifier.h`, `linux/of.h`, `linux/device.h`, `linux/workqueue.h`.
- Detected declarations: `struct framer_config`, `struct framer_status`, `struct framer`, `enum framer_iface`, `enum framer_clock_type`, `enum framer_event`, `function framer_pm_runtime_get`, `function framer_pm_runtime_get_sync`, `function framer_pm_runtime_put`, `function framer_init`.
- 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.