drivers/phy/qualcomm/phy-qcom-edp.c
Source file repositories/reference/linux-study-clean/drivers/phy/qualcomm/phy-qcom-edp.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/qualcomm/phy-qcom-edp.c- Extension
.c- Size
- 43503 bytes
- Lines
- 1509
- 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.
- 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/phy/phy.hlinux/phy/phy-dp.hlinux/platform_device.hlinux/regulator/consumer.hlinux/reset.hlinux/slab.hdt-bindings/phy/phy.hphy-qcom-qmp-dp-phy.hphy-qcom-qmp-qserdes-com-v4.hphy-qcom-qmp-qserdes-com-v6.hphy-qcom-qmp-qserdes-dp-com-v8.h
Detected Declarations
struct qcom_edp_swing_pre_emph_cfgstruct qcom_edpstruct phy_ver_opsstruct qcom_edp_phy_cfgstruct qcom_edpfunction qcom_edp_phy_initfunction qcom_edp_set_voltagesfunction qcom_edp_phy_configurefunction qcom_edp_configure_sscfunction qcom_edp_configure_pllfunction qcom_edp_set_vco_divfunction qcom_edp_phy_power_on_v4function qcom_edp_phy_com_resetsm_cntrl_v4function qcom_edp_com_clk_fwd_cfg_v4function qcom_edp_com_bias_en_clkbuflr_v4function qcom_edp_com_configure_ssc_v4function qcom_edp_com_configure_pll_v4function qcom_edp_ldo_config_v3function qcom_edp_ldo_config_v4function qcom_edp_phy_power_on_v6function qcom_edp_phy_com_resetsm_cntrl_v6function qcom_edp_com_bias_en_clkbuflr_v6function qcom_edp_com_configure_ssc_v6function qcom_edp_com_configure_pll_v6function qcom_edp_ldo_config_v6function qcom_edp_com_configure_ssc_v8function qcom_edp_com_configure_pll_v8function qcom_edp_phy_com_resetsm_cntrl_v8function qcom_edp_com_clk_fwd_cfg_v8function qcom_edp_com_bias_en_clkbuflr_v8function qcom_edp_phy_power_on_v8function qcom_edp_phy_power_onfunction qcom_edp_phy_power_offfunction qcom_edp_phy_set_modefunction qcom_edp_phy_exitfunction qcom_edp_dp_pixel_clk_determine_ratefunction qcom_edp_dp_pixel_clk_recalc_ratefunction qcom_edp_dp_link_clk_determine_ratefunction qcom_edp_dp_link_clk_recalc_ratefunction qcom_edp_clks_registerfunction qcom_edp_phy_probe
Annotated Snippet
struct qcom_edp_swing_pre_emph_cfg {
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];
};
struct qcom_edp;
struct phy_ver_ops {
int (*com_power_on)(const struct qcom_edp *edp);
int (*com_resetsm_cntrl)(const struct qcom_edp *edp);
int (*com_bias_en_clkbuflr)(const struct qcom_edp *edp);
int (*com_clk_fwd_cfg)(const struct qcom_edp *edp);
int (*com_configure_pll)(const struct qcom_edp *edp);
int (*com_configure_ssc)(const struct qcom_edp *edp);
int (*com_ldo_config)(const struct qcom_edp *edp);
};
struct qcom_edp_phy_cfg {
bool is_edp;
const u8 *aux_cfg;
const u8 *vco_div_cfg;
const struct qcom_edp_swing_pre_emph_cfg *dp_swing_pre_emph_cfg;
const struct qcom_edp_swing_pre_emph_cfg *edp_swing_pre_emph_cfg;
const struct phy_ver_ops *ver_ops;
};
struct qcom_edp {
struct device *dev;
const struct qcom_edp_phy_cfg *cfg;
struct phy *phy;
void __iomem *edp;
void __iomem *tx0;
void __iomem *tx1;
void __iomem *pll;
struct clk_hw dp_link_hw;
struct clk_hw dp_pixel_hw;
struct phy_configure_opts_dp dp_opts;
struct clk_bulk_data *clks;
int num_clks;
struct regulator_bulk_data supplies[2];
bool is_edp;
};
static const u8 dp_swing_hbr_rbr[4][4] = {
{ 0x07, 0x0f, 0x16, 0x1f },
{ 0x11, 0x1e, 0x1f, 0xff },
{ 0x16, 0x1f, 0xff, 0xff },
{ 0x1f, 0xff, 0xff, 0xff }
};
static const u8 dp_pre_emp_hbr_rbr[4][4] = {
{ 0x00, 0x0e, 0x15, 0x1a },
{ 0x00, 0x0e, 0x15, 0xff },
{ 0x00, 0x0e, 0xff, 0xff },
{ 0x04, 0xff, 0xff, 0xff }
};
static const u8 dp_swing_hbr2_hbr3[4][4] = {
{ 0x02, 0x12, 0x16, 0x1a },
{ 0x09, 0x19, 0x1f, 0xff },
{ 0x10, 0x1f, 0xff, 0xff },
{ 0x1f, 0xff, 0xff, 0xff }
};
static const u8 dp_pre_emp_hbr2_hbr3[4][4] = {
{ 0x00, 0x0c, 0x15, 0x1b },
{ 0x02, 0x0e, 0x16, 0xff },
{ 0x02, 0x11, 0xff, 0xff },
{ 0x04, 0xff, 0xff, 0xff }
};
static const struct qcom_edp_swing_pre_emph_cfg dp_phy_swing_pre_emph_cfg = {
.swing_hbr_rbr = &dp_swing_hbr_rbr,
.swing_hbr3_hbr2 = &dp_swing_hbr2_hbr3,
.pre_emphasis_hbr_rbr = &dp_pre_emp_hbr_rbr,
.pre_emphasis_hbr3_hbr2 = &dp_pre_emp_hbr2_hbr3,
};
static const u8 dp_pre_emp_hbr_rbr_v8[4][4] = {
{ 0x00, 0x0e, 0x15, 0x1a },
{ 0x00, 0x0e, 0x15, 0xff },
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 qcom_edp_swing_pre_emph_cfg`, `struct qcom_edp`, `struct phy_ver_ops`, `struct qcom_edp_phy_cfg`, `struct qcom_edp`, `function qcom_edp_phy_init`, `function qcom_edp_set_voltages`, `function qcom_edp_phy_configure`, `function qcom_edp_configure_ssc`, `function qcom_edp_configure_pll`.
- Atlas domain: Driver Families / drivers/phy.
- Implementation status: source 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.