Documentation/arch/s390/driver-model.rst
Source file repositories/reference/linux-study-clean/Documentation/arch/s390/driver-model.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/arch/s390/driver-model.rst- Extension
.rst- Size
- 9532 bytes
- Lines
- 308
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct ccw_devicestruct ccw_driverstruct ccw_device_id
Annotated Snippet
struct device_driver driver;
char *name;
};
The 'private' field contains data needed for internal i/o operation only, and
is not available to the device driver.
Each driver should declare in a MODULE_DEVICE_TABLE into which CU types/models
and/or device types/models it is interested. This information can later be found
in the struct ccw_device_id fields::
struct ccw_device_id {
__u16 match_flags;
__u16 cu_type;
__u16 dev_type;
__u8 cu_model;
__u8 dev_model;
unsigned long driver_info;
};
The functions in ccw_driver should be used in the following way:
probe:
This function is called by the device layer for each device the driver
is interested in. The driver should only allocate private structures
to put in dev->driver_data and create attributes (if needed). Also,
the interrupt handler (see below) should be set here.
::
int (*probe) (struct ccw_device *cdev);
Parameters:
cdev
- the device to be probed.
remove:
This function is called by the device layer upon removal of the driver,
the device or the module. The driver should perform cleanups here.
::
int (*remove) (struct ccw_device *cdev);
Parameters:
cdev
- the device to be removed.
set_online:
This function is called by the common I/O layer when the device is
activated via the 'online' attribute. The driver should finally
setup and activate the device here.
::
int (*set_online) (struct ccw_device *);
Parameters:
cdev
- the device to be activated. The common layer has
verified that the device is not already online.
set_offline: This function is called by the common I/O layer when the device is
de-activated via the 'online' attribute. The driver should shut
down the device, but not de-allocate its private data.
Annotation
- Detected declarations: `struct ccw_device`, `struct ccw_driver`, `struct ccw_device_id`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- 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.