drivers/phy/qualcomm/phy-qcom-qmp-combo.c
Source file repositories/reference/linux-study-clean/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/qualcomm/phy-qcom-qmp-combo.c- Extension
.c- Size
- 193795 bytes
- Lines
- 5067
- Domain
- Driver Families
- Bucket
- drivers/phy
- 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.
- 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/clk.hlinux/clk-provider.hlinux/delay.hlinux/err.hlinux/io.hlinux/iopoll.hlinux/kernel.hlinux/module.hlinux/of.hlinux/of_address.hlinux/of_graph.hlinux/phy/phy.hlinux/platform_device.hlinux/regulator/consumer.hlinux/reset.hlinux/slab.hlinux/usb/typec.hlinux/usb/typec_dp.hlinux/usb/typec_mux.hdrm/bridge/aux-bridge.hdt-bindings/phy/phy-qcom-qmp.hphy-qcom-qmp-common.hphy-qcom-qmp.hphy-qcom-qmp-pcs-aon-v6.hphy-qcom-qmp-pcs-aon-v8.hphy-qcom-qmp-pcs-misc-v3.hphy-qcom-qmp-pcs-misc-v4.hphy-qcom-qmp-pcs-misc-v5.hphy-qcom-qmp-pcs-misc-v8.hphy-qcom-qmp-pcs-usb-v4.hphy-qcom-qmp-pcs-usb-v5.hphy-qcom-qmp-pcs-usb-v6.h
Detected Declarations
struct qmp_combo_lane_mappingstruct qmp_combostruct qmp_combo_offsetsstruct qmp_phy_cfgstruct qmp_comboenum qmpphy_modeenum qphy_reg_layoutfunction qphy_setbitsfunction qphy_clrbitsfunction qmp_combo_dp_serdes_initfunction qmp_v3_dp_aux_initfunction qmp_combo_configure_dp_swingfunction qmp_v3_configure_dp_txfunction qmp_combo_configure_dp_modefunction qmp_v3_configure_dp_clocksfunction qmp_v3_configure_dp_phyfunction qmp_v3_calibrate_dp_phyfunction qmp_v4_dp_aux_initfunction qmp_v8_dp_aux_initfunction qmp_v4_configure_dp_txfunction qmp_v8_configure_dp_clocksfunction qmp_v456_configure_dp_phyfunction qmp_v4_configure_dp_phyfunction qmp_v8_configure_dp_phyfunction qmp_v4_calibrate_dp_phyfunction qmp_combo_dp_configurefunction qmp_combo_dp_calibratefunction qmp_combo_com_initfunction qmp_combo_com_exitfunction qmp_combo_dp_initfunction qmp_combo_dp_exitfunction qmp_combo_dp_power_onfunction qmp_combo_dp_power_offfunction qmp_combo_usb_power_onfunction qmp_combo_usb_power_offfunction qmp_combo_usb_initfunction qmp_combo_usb_exitfunction qmp_combo_usb_set_modefunction qmp_combo_enable_autonomous_modefunction qmp_combo_disable_autonomous_modefunction qmp_combo_runtime_suspendfunction qmp_combo_runtime_resumefunction qmp_combo_reset_initfunction qmp_combo_clk_initfunction phy_clk_release_providerfunction phy_pipe_clk_registerfunction qmp_dp_pixel_clk_determine_ratefunction qmp_dp_pixel_clk_recalc_rate
Annotated Snippet
struct qmp_combo_lane_mapping {
unsigned int lanes_count;
enum typec_orientation orientation;
u32 lanes[4];
};
static const struct qmp_combo_lane_mapping usb3_data_lanes[] = {
{ 2, TYPEC_ORIENTATION_NORMAL, { 1, 0 }},
{ 2, TYPEC_ORIENTATION_REVERSE, { 2, 3 }},
};
static const struct qmp_combo_lane_mapping dp_data_lanes[] = {
{ 1, TYPEC_ORIENTATION_NORMAL, { 3 }},
{ 1, TYPEC_ORIENTATION_REVERSE, { 0 }},
{ 2, TYPEC_ORIENTATION_NORMAL, { 3, 2 }},
{ 2, TYPEC_ORIENTATION_REVERSE, { 0, 1 }},
{ 4, TYPEC_ORIENTATION_NORMAL, { 3, 2, 1, 0 }},
{ 4, TYPEC_ORIENTATION_REVERSE, { 0, 1, 2, 3 }},
};
struct qmp_combo;
struct qmp_combo_offsets {
u16 com;
u16 txa;
u16 rxa;
u16 txb;
u16 rxb;
u16 usb3_serdes;
u16 usb3_pcs_misc;
u16 usb3_pcs;
u16 usb3_pcs_aon;
u16 usb3_pcs_usb;
u16 dp_serdes;
u16 dp_txa;
u16 dp_txb;
u16 dp_dp_phy;
};
struct qmp_phy_cfg {
const struct qmp_combo_offsets *offsets;
/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
const struct qmp_phy_init_tbl *serdes_tbl;
int serdes_tbl_num;
const struct qmp_phy_init_tbl *tx_tbl;
int tx_tbl_num;
const struct qmp_phy_init_tbl *rx_tbl;
int rx_tbl_num;
const struct qmp_phy_init_tbl *pcs_tbl;
int pcs_tbl_num;
const struct qmp_phy_init_tbl *pcs_usb_tbl;
int pcs_usb_tbl_num;
const struct qmp_phy_init_tbl *pcs_misc_tbl;
int pcs_misc_tbl_num;
const struct qmp_phy_init_tbl *dp_serdes_tbl;
int dp_serdes_tbl_num;
const struct qmp_phy_init_tbl *dp_tx_tbl;
int dp_tx_tbl_num;
/* Init sequence for DP PHY block link rates */
const struct qmp_phy_init_tbl *serdes_tbl_rbr;
int serdes_tbl_rbr_num;
const struct qmp_phy_init_tbl *serdes_tbl_hbr;
int serdes_tbl_hbr_num;
const struct qmp_phy_init_tbl *serdes_tbl_hbr2;
int serdes_tbl_hbr2_num;
const struct qmp_phy_init_tbl *serdes_tbl_hbr3;
int serdes_tbl_hbr3_num;
/* DP PHY swing and pre_emphasis tables */
const u8 (*swing_hbr_rbr)[4][4];
const u8 (*swing_hbr3_hbr2)[4][4];
const u8 (*pre_emphasis_hbr_rbr)[4][4];
const u8 (*pre_emphasis_hbr3_hbr2)[4][4];
/* DP PHY callbacks */
int (*configure_dp_clocks)(struct qmp_combo *qmp);
int (*configure_dp_phy)(struct qmp_combo *qmp);
void (*configure_dp_tx)(struct qmp_combo *qmp);
int (*calibrate_dp_phy)(struct qmp_combo *qmp);
void (*dp_aux_init)(struct qmp_combo *qmp);
/* resets to be requested */
const char * const *reset_list;
int num_resets;
/* regulators to be requested */
const struct regulator_bulk_data *vreg_list;
int num_vregs;
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clk-provider.h`, `linux/delay.h`, `linux/err.h`, `linux/io.h`, `linux/iopoll.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `struct qmp_combo_lane_mapping`, `struct qmp_combo`, `struct qmp_combo_offsets`, `struct qmp_phy_cfg`, `struct qmp_combo`, `enum qmpphy_mode`, `enum qphy_reg_layout`, `function qphy_setbits`, `function qphy_clrbits`, `function qmp_combo_dp_serdes_init`.
- Atlas domain: Driver Families / drivers/phy.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.