drivers/ps3/ps3-vuart.c
Source file repositories/reference/linux-study-clean/drivers/ps3/ps3-vuart.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/ps3/ps3-vuart.c- Extension
.c- Size
- 30468 bytes
- Lines
- 1248
- Domain
- Driver Families
- Bucket
- drivers/ps3
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/slab.hlinux/module.hlinux/interrupt.hlinux/workqueue.hlinux/bitops.hasm/ps3.hasm/firmware.hasm/lv1call.hvuart.h
Detected Declarations
struct ps3_vuart_port_privstruct ports_bmpstruct list_bufferenum vuart_paramenum vuart_interrupt_bitenum vuart_interrupt_maskfunction _dump_ports_bmpfunction _dump_port_paramsfunction ps3_vuart_get_triggersfunction ps3_vuart_set_triggersfunction ps3_vuart_get_rx_bytes_waitingfunction ps3_vuart_set_interrupt_maskfunction ps3_vuart_get_interrupt_statusfunction ps3_vuart_enable_interrupt_txfunction ps3_vuart_enable_interrupt_rxfunction ps3_vuart_enable_interrupt_disconnectfunction ps3_vuart_disable_interrupt_txfunction ps3_vuart_disable_interrupt_rxfunction ps3_vuart_disable_interrupt_disconnectfunction ps3_vuart_raw_writefunction ps3_vuart_raw_readfunction ps3_vuart_clear_rx_bytesfunction ps3_vuart_writefunction ps3_vuart_queue_rx_bytesfunction ps3_vuart_readfunction list_for_each_entry_safefunction ps3_vuart_workfunction ps3_vuart_read_asyncfunction ps3_vuart_cancel_asyncfunction ps3_vuart_handle_interrupt_txfunction list_for_each_entry_safefunction ps3_vuart_handle_interrupt_rxfunction ps3_vuart_handle_interrupt_disconnectfunction ps3_vuart_handle_port_interruptfunction ps3_vuart_irq_handlerfunction ps3_vuart_bus_interrupt_getfunction ps3_vuart_bus_interrupt_putfunction ps3_vuart_probefunction ps3_vuart_cleanupfunction ps3_vuart_removefunction ps3_vuart_shutdownfunction ps3_vuart_bus_initfunction ps3_vuart_bus_exitfunction ps3_vuart_port_driver_registerfunction ps3_vuart_port_driver_unregistermodule init ps3_vuart_bus_initexport ps3_vuart_clear_rx_bytesexport ps3_vuart_write
Annotated Snippet
core_initcall(ps3_vuart_bus_init);
module_exit(ps3_vuart_bus_exit);
/**
* ps3_vuart_port_driver_register - Add a vuart port device driver.
*/
int ps3_vuart_port_driver_register(struct ps3_vuart_port_driver *drv)
{
int result;
pr_debug("%s:%d: (%s)\n", __func__, __LINE__, drv->core.core.name);
BUG_ON(!drv->core.match_id);
BUG_ON(!drv->core.core.name);
drv->core.probe = ps3_vuart_probe;
drv->core.remove = ps3_vuart_remove;
drv->core.shutdown = ps3_vuart_shutdown;
result = ps3_system_bus_driver_register(&drv->core);
return result;
}
EXPORT_SYMBOL_GPL(ps3_vuart_port_driver_register);
/**
* ps3_vuart_port_driver_unregister - Remove a vuart port device driver.
*/
void ps3_vuart_port_driver_unregister(struct ps3_vuart_port_driver *drv)
{
pr_debug("%s:%d: (%s)\n", __func__, __LINE__, drv->core.core.name);
ps3_system_bus_driver_unregister(&drv->core);
}
EXPORT_SYMBOL_GPL(ps3_vuart_port_driver_unregister);
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/slab.h`, `linux/module.h`, `linux/interrupt.h`, `linux/workqueue.h`, `linux/bitops.h`, `asm/ps3.h`, `asm/firmware.h`.
- Detected declarations: `struct ps3_vuart_port_priv`, `struct ports_bmp`, `struct list_buffer`, `enum vuart_param`, `enum vuart_interrupt_bit`, `enum vuart_interrupt_mask`, `function _dump_ports_bmp`, `function _dump_port_params`, `function ps3_vuart_get_triggers`, `function ps3_vuart_set_triggers`.
- Atlas domain: Driver Families / drivers/ps3.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.