include/linux/moxtet.h
Source file repositories/reference/linux-study-clean/include/linux/moxtet.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/moxtet.h- Extension
.h- Size
- 2326 bytes
- Lines
- 103
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/irq.hlinux/irqdomain.hlinux/mutex.h
Detected Declarations
struct moxtetstruct moxtet_irqposstruct moxtet_driverstruct moxtet_deviceenum turris_mox_cpu_module_idenum turris_mox_module_idfunction moxtet_unregister_driverfunction to_moxtet_device
Annotated Snippet
struct device_driver driver;
};
#define to_moxtet_driver(__drv) \
( __drv ? container_of_const(__drv, struct moxtet_driver, driver) : NULL )
extern int __moxtet_register_driver(struct module *owner,
struct moxtet_driver *mdrv);
static inline void moxtet_unregister_driver(struct moxtet_driver *mdrv)
{
if (mdrv)
driver_unregister(&mdrv->driver);
}
#define moxtet_register_driver(driver) \
__moxtet_register_driver(THIS_MODULE, driver)
#define module_moxtet_driver(__moxtet_driver) \
module_driver(__moxtet_driver, moxtet_register_driver, \
moxtet_unregister_driver)
struct moxtet_device {
struct device dev;
struct moxtet *moxtet;
enum turris_mox_module_id id;
unsigned int idx;
};
extern int moxtet_device_read(struct device *dev);
extern int moxtet_device_write(struct device *dev, u8 val);
extern int moxtet_device_written(struct device *dev);
static inline struct moxtet_device *
to_moxtet_device(struct device *dev)
{
if (!dev)
return NULL;
return container_of(dev, struct moxtet_device, dev);
}
#endif /* __LINUX_MOXTET_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/irq.h`, `linux/irqdomain.h`, `linux/mutex.h`.
- Detected declarations: `struct moxtet`, `struct moxtet_irqpos`, `struct moxtet_driver`, `struct moxtet_device`, `enum turris_mox_cpu_module_id`, `enum turris_mox_module_id`, `function moxtet_unregister_driver`, `function to_moxtet_device`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: pattern 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.