drivers/net/wwan/t7xx/t7xx_pci.h
Source file repositories/reference/linux-study-clean/drivers/net/wwan/t7xx/t7xx_pci.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/wwan/t7xx/t7xx_pci.h- Extension
.h- Size
- 4935 bytes
- Lines
- 141
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/completion.hlinux/irqreturn.hlinux/mutex.hlinux/pci.hlinux/spinlock.hlinux/types.ht7xx_reg.h
Detected Declarations
struct t7xx_addr_basestruct t7xx_pci_devstruct md_pm_entityenum t7xx_modeenum t7xx_pm_id
Annotated Snippet
struct t7xx_addr_base {
void __iomem *pcie_mac_ireg_base;
void __iomem *pcie_ext_reg_base;
u32 pcie_dev_reg_trsl_addr;
void __iomem *infracfg_ao_base;
void __iomem *mhccif_rc_base;
};
typedef irqreturn_t (*t7xx_intr_callback)(int irq, void *param);
enum t7xx_mode {
T7XX_UNKNOWN,
T7XX_READY,
T7XX_RESET,
T7XX_FASTBOOT_SWITCHING,
T7XX_FASTBOOT_DOWNLOAD,
T7XX_FASTBOOT_DUMP,
T7XX_MODE_LAST, /* must always be last */
};
/* struct t7xx_pci_dev - MTK device context structure
* @intr_handler: array of handler function for request_threaded_irq
* @intr_thread: array of thread_fn for request_threaded_irq
* @callback_param: array of cookie passed back to interrupt functions
* @pdev: PCI device
* @base_addr: memory base addresses of HW components
* @md: modem interface
* @ccmni_ctlb: context structure used to control the network data path
* @rgu_pci_irq_en: RGU callback ISR registered and active
* @md_pm_entities: list of pm entities
* @md_pm_entity_mtx: protects md_pm_entities list
* @pm_sr_ack: ack from the device when went to sleep or woke up
* @md_pm_state: state for resume/suspend
* @md_pm_lock: protects PCIe sleep lock
* @sleep_disable_count: PCIe L1.2 lock counter
* @sleep_lock_acquire: indicates that sleep has been disabled
* @mode: indicates the device mode
*/
struct t7xx_pci_dev {
t7xx_intr_callback intr_handler[EXT_INT_NUM];
t7xx_intr_callback intr_thread[EXT_INT_NUM];
void *callback_param[EXT_INT_NUM];
struct pci_dev *pdev;
struct t7xx_addr_base base_addr;
struct t7xx_modem *md;
struct t7xx_ccmni_ctrl *ccmni_ctlb;
bool rgu_pci_irq_en;
struct completion init_done;
/* Low Power Items */
struct list_head md_pm_entities;
struct mutex md_pm_entity_mtx; /* Protects MD PM entities list */
struct completion pm_sr_ack;
atomic_t md_pm_state;
spinlock_t md_pm_lock; /* Protects PCI resource lock */
unsigned int sleep_disable_count;
struct completion sleep_lock_acquire;
#ifdef CONFIG_WWAN_DEBUGFS
struct dentry *debugfs_dir;
#endif
u32 mode;
bool debug_ports_show;
};
enum t7xx_pm_id {
PM_ENTITY_ID_CTRL1,
PM_ENTITY_ID_CTRL2,
PM_ENTITY_ID_DATA,
PM_ENTITY_ID_INVALID
};
/* struct md_pm_entity - device power management entity
* @entity: list of PM Entities
* @suspend: callback invoked before sending D3 request to device
* @suspend_late: callback invoked after getting D3 ACK from device
* @resume_early: callback invoked before sending the resume request to device
* @resume: callback invoked after getting resume ACK from device
* @id: unique PM entity identifier
* @entity_param: parameter passed to the registered callbacks
*
* This structure is used to indicate PM operations required by internal
* HW modules such as CLDMA and DPMA.
*/
struct md_pm_entity {
struct list_head entity;
int (*suspend)(struct t7xx_pci_dev *t7xx_dev, void *entity_param);
void (*suspend_late)(struct t7xx_pci_dev *t7xx_dev, void *entity_param);
void (*resume_early)(struct t7xx_pci_dev *t7xx_dev, void *entity_param);
int (*resume)(struct t7xx_pci_dev *t7xx_dev, void *entity_param);
enum t7xx_pm_id id;
Annotation
- Immediate include surface: `linux/completion.h`, `linux/irqreturn.h`, `linux/mutex.h`, `linux/pci.h`, `linux/spinlock.h`, `linux/types.h`, `t7xx_reg.h`.
- Detected declarations: `struct t7xx_addr_base`, `struct t7xx_pci_dev`, `struct md_pm_entity`, `enum t7xx_mode`, `enum t7xx_pm_id`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source 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.