drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
Source file repositories/reference/linux-study-clean/drivers/phy/rockchip/phy-rockchip-inno-hdmi.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/phy/rockchip/phy-rockchip-inno-hdmi.c- Extension
.c- Size
- 49255 bytes
- Lines
- 1441
- 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.
- 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/clk.hlinux/clk-provider.hlinux/delay.hlinux/io.hlinux/interrupt.hlinux/kernel.hlinux/module.hlinux/nvmem-consumer.hlinux/of.hlinux/platform_device.hlinux/regmap.hlinux/phy/phy.hlinux/slab.h
Detected Declarations
struct inno_hdmi_phy_drv_datastruct inno_hdmi_phystruct pre_pll_configstruct post_pll_configstruct phy_configstruct inno_hdmi_phy_opsstruct inno_hdmi_phy_drv_datafunction inno_writefunction inno_readfunction inno_update_bitsfunction inno_hdmi_phy_get_tmdsclkfunction inno_hdmi_phy_rk3328_hardirqfunction inno_hdmi_phy_rk3328_irqfunction inno_hdmi_phy_power_onfunction inno_hdmi_phy_power_offfunction inno_hdmi_phy_rk3228_clk_is_preparedfunction inno_hdmi_phy_rk3228_clk_preparefunction inno_hdmi_phy_rk3228_clk_unpreparefunction inno_hdmi_phy_rk3228_clk_recalc_ratefunction inno_hdmi_phy_rk3228_clk_determine_ratefunction inno_hdmi_phy_rk3228_clk_set_ratefunction inno_hdmi_phy_rk3328_clk_is_preparedfunction inno_hdmi_phy_rk3328_clk_preparefunction inno_hdmi_phy_rk3328_clk_unpreparefunction inno_hdmi_phy_rk3328_clk_recalc_ratefunction inno_hdmi_phy_rk3328_clk_determine_ratefunction inno_hdmi_phy_rk3328_clk_set_ratefunction inno_hdmi_phy_clk_registerfunction inno_hdmi_phy_rk3228_initfunction inno_hdmi_phy_rk3228_power_onfunction inno_hdmi_phy_rk3228_power_offfunction inno_hdmi_phy_rk3328_initfunction inno_hdmi_phy_rk3328_power_onfunction inno_hdmi_phy_rk3328_power_offfunction inno_hdmi_phy_actionfunction inno_hdmi_phy_probefunction inno_hdmi_phy_remove
Annotated Snippet
struct inno_hdmi_phy {
struct device *dev;
struct regmap *regmap;
int irq;
struct phy *phy;
struct clk *sysclk;
struct clk *refoclk;
struct clk *refpclk;
/* platform data */
const struct inno_hdmi_phy_drv_data *plat_data;
int chip_version;
/* clk provider */
struct clk_hw hw;
struct clk *phyclk;
unsigned long pixclock;
unsigned long tmdsclock;
};
struct pre_pll_config {
unsigned long pixclock;
unsigned long tmdsclock;
u8 prediv;
u16 fbdiv;
u8 tmds_div_a;
u8 tmds_div_b;
u8 tmds_div_c;
u8 pclk_div_a;
u8 pclk_div_b;
u8 pclk_div_c;
u8 pclk_div_d;
u8 vco_div_5_en;
u32 fracdiv;
};
struct post_pll_config {
unsigned long tmdsclock;
u8 prediv;
u16 fbdiv;
u8 postdiv;
u8 version;
};
struct phy_config {
unsigned long tmdsclock;
u8 regs[14];
};
struct inno_hdmi_phy_ops {
int (*init)(struct inno_hdmi_phy *inno);
int (*power_on)(struct inno_hdmi_phy *inno,
const struct post_pll_config *cfg,
const struct phy_config *phy_cfg);
void (*power_off)(struct inno_hdmi_phy *inno);
};
struct inno_hdmi_phy_drv_data {
const struct inno_hdmi_phy_ops *ops;
const struct clk_ops *clk_ops;
const struct phy_config *phy_cfg_table;
};
static const struct pre_pll_config pre_pll_cfg_table[] = {
{ 25175000, 25175000, 3, 125, 3, 1, 1, 1, 3, 3, 4, 0, 0xe00000},
{ 25175000, 31468750, 1, 41, 0, 3, 3, 1, 3, 3, 4, 0, 0xf5554f},
{ 27000000, 27000000, 1, 36, 0, 3, 3, 1, 2, 3, 4, 0, 0x0},
{ 27000000, 33750000, 1, 45, 0, 3, 3, 1, 3, 3, 4, 0, 0x0},
{ 31500000, 31500000, 1, 42, 0, 3, 3, 1, 2, 3, 4, 0, 0x0},
{ 31500000, 39375000, 1, 105, 1, 3, 3, 10, 0, 3, 4, 0, 0x0},
{ 33750000, 33750000, 1, 45, 0, 3, 3, 1, 2, 3, 4, 0, 0x0},
{ 33750000, 42187500, 1, 169, 2, 3, 3, 15, 0, 3, 4, 0, 0x0},
{ 35500000, 35500000, 1, 71, 2, 2, 2, 6, 0, 3, 4, 0, 0x0},
{ 35500000, 44375000, 1, 74, 3, 1, 1, 25, 0, 1, 1, 0, 0x0},
{ 36000000, 36000000, 1, 36, 2, 1, 1, 1, 1, 3, 4, 0, 0x0},
{ 36000000, 45000000, 1, 45, 2, 1, 1, 15, 0, 1, 1, 0, 0x0},
{ 40000000, 40000000, 1, 40, 2, 1, 1, 1, 1, 3, 4, 0, 0x0},
{ 40000000, 50000000, 1, 50, 2, 1, 1, 15, 0, 1, 1, 0, 0x0},
{ 49500000, 49500000, 1, 66, 0, 3, 3, 1, 2, 3, 4, 0, 0x0},
{ 49500000, 61875000, 1, 165, 1, 3, 3, 10, 0, 3, 4, 0, 0x0},
{ 50000000, 50000000, 1, 50, 2, 1, 1, 1, 1, 3, 4, 0, 0x0},
{ 50000000, 62500000, 1, 125, 2, 2, 2, 15, 0, 2, 2, 0, 0x0},
{ 54000000, 54000000, 1, 36, 0, 2, 2, 1, 0, 3, 4, 0, 0x0},
{ 54000000, 67500000, 1, 45, 0, 2, 2, 1, 3, 2, 2, 0, 0x0},
{ 56250000, 56250000, 1, 75, 0, 3, 3, 1, 2, 3, 4, 0, 0x0},
{ 56250000, 70312500, 1, 117, 3, 1, 1, 25, 0, 1, 1, 0, 0x0},
{ 59341000, 59341000, 1, 118, 2, 2, 2, 6, 0, 3, 4, 0, 0xae978d},
{ 59341000, 74176250, 2, 148, 2, 1, 1, 15, 0, 1, 1, 0, 0x5a3d70},
{ 59400000, 59400000, 1, 99, 3, 1, 1, 1, 3, 3, 4, 0, 0x0},
Annotation
- Immediate include surface: `linux/clk.h`, `linux/clk-provider.h`, `linux/delay.h`, `linux/io.h`, `linux/interrupt.h`, `linux/kernel.h`, `linux/module.h`, `linux/nvmem-consumer.h`.
- Detected declarations: `struct inno_hdmi_phy_drv_data`, `struct inno_hdmi_phy`, `struct pre_pll_config`, `struct post_pll_config`, `struct phy_config`, `struct inno_hdmi_phy_ops`, `struct inno_hdmi_phy_drv_data`, `function inno_write`, `function inno_read`, `function inno_update_bits`.
- Atlas domain: Driver Families / drivers/phy.
- Implementation status: source implementation candidate.
- 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.