drivers/gpu/drm/bridge/lontium-lt9611.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/lontium-lt9611.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/lontium-lt9611.c- Extension
.c- Size
- 31608 bytes
- Lines
- 1256
- Domain
- Driver Families
- Bucket
- drivers/gpu
- 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/gpio/consumer.hlinux/i2c.hlinux/interrupt.hlinux/media-bus-format.hlinux/module.hlinux/of_graph.hlinux/platform_device.hlinux/regmap.hlinux/regulator/consumer.hsound/hdmi-codec.hdrm/drm_atomic_helper.hdrm/drm_bridge.hdrm/drm_edid.hdrm/drm_mipi_dsi.hdrm/drm_of.hdrm/drm_print.hdrm/drm_probe_helper.hdrm/display/drm_hdmi_helper.hdrm/display/drm_hdmi_state_helper.h
Detected Declarations
struct lt9611function lt9611_mipi_input_analogfunction lt9611_mipi_input_digitalfunction lt9611_mipi_video_setupfunction lt9611_pcr_setupfunction lt9611_pll_setupfunction lt9611_read_video_checkfunction lt9611_video_checkfunction lt9611_hdmi_tx_digitalfunction lt9611_hdmi_tx_phyfunction lt9611_irq_thread_handlerfunction lt9611_enable_hpd_interruptsfunction lt9611_sleep_setupfunction lt9611_power_onfunction lt9611_power_offfunction lt9611_resetfunction lt9611_assert_5vfunction lt9611_regulator_initfunction lt9611_regulator_enablefunction lt9611_bridge_detectfunction lt9611_read_edidfunction lt9611_get_edid_blockfunction lt9611_bridge_atomic_enablefunction lt9611_bridge_atomic_disablefunction lt9611_bridge_attachfunction lt9611_bridge_mode_validfunction lt9611_bridge_atomic_pre_enablefunction lt9611_bridge_atomic_post_disablefunction lt9611_bridge_hpd_enablefunction lt9611_atomic_get_input_bus_fmtsfunction lt9611_hdmi_clear_audio_infoframefunction lt9611_hdmi_clear_avi_infoframefunction lt9611_hdmi_clear_spd_infoframefunction lt9611_hdmi_clear_hdmi_infoframefunction lt9611_hdmi_write_audio_infoframefunction lt9611_hdmi_write_avi_infoframefunction lt9611_hdmi_write_spd_infoframefunction lt9611_hdmi_write_hdmi_infoframefunction lt9611_hdmi_tmds_char_rate_validfunction lt9611_hdmi_audio_startupfunction lt9611_hdmi_audio_preparefunction lt9611_hdmi_audio_shutdownfunction lt9611_parse_dtfunction lt9611_gpio_initfunction lt9611_read_device_revfunction lt9611_probefunction lt9611_remove
Annotated Snippet
struct lt9611 {
struct device *dev;
struct drm_bridge bridge;
struct regmap *regmap;
struct device_node *dsi0_node;
struct device_node *dsi1_node;
struct mipi_dsi_device *dsi0;
struct mipi_dsi_device *dsi1;
bool ac_mode;
struct gpio_desc *reset_gpio;
struct gpio_desc *enable_gpio;
bool power_on;
bool sleep;
struct regulator_bulk_data supplies[2];
struct i2c_client *client;
enum drm_connector_status status;
u8 edid_buf[EDID_SEG_SIZE];
};
#define LT9611_PAGE_CONTROL 0xff
static const struct regmap_range_cfg lt9611_ranges[] = {
{
.name = "register_range",
.range_min = 0,
.range_max = 0x85ff,
.selector_reg = LT9611_PAGE_CONTROL,
.selector_mask = 0xff,
.selector_shift = 0,
.window_start = 0,
.window_len = 0x100,
},
};
static const struct regmap_config lt9611_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0xffff,
.ranges = lt9611_ranges,
.num_ranges = ARRAY_SIZE(lt9611_ranges),
};
static struct lt9611 *bridge_to_lt9611(struct drm_bridge *bridge)
{
return container_of(bridge, struct lt9611, bridge);
}
static int lt9611_mipi_input_analog(struct lt9611 *lt9611)
{
const struct reg_sequence reg_cfg[] = {
{ 0x8106, 0x40 }, /* port A rx current */
{ 0x810a, 0xfe }, /* port A ldo voltage set */
{ 0x810b, 0xbf }, /* enable port A lprx */
{ 0x8111, 0x40 }, /* port B rx current */
{ 0x8115, 0xfe }, /* port B ldo voltage set */
{ 0x8116, 0xbf }, /* enable port B lprx */
{ 0x811c, 0x03 }, /* PortA clk lane no-LP mode */
{ 0x8120, 0x03 }, /* PortB clk lane with-LP mode */
};
return regmap_multi_reg_write(lt9611->regmap, reg_cfg, ARRAY_SIZE(reg_cfg));
}
static int lt9611_mipi_input_digital(struct lt9611 *lt9611,
const struct drm_display_mode *mode)
{
struct reg_sequence reg_cfg[] = {
{ 0x8300, LT9611_4LANES },
{ 0x830a, 0x00 },
{ 0x824f, 0x80 },
{ 0x8250, 0x10 },
{ 0x8303, 0x00 },
{ 0x8302, 0x0a },
{ 0x8306, 0x0a },
};
if (lt9611->dsi1_node) {
if (lt9611->dsi0_node) {
/* Dual port (Port A + B) */
reg_cfg[1].def = 0x03;
Annotation
- Immediate include surface: `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/interrupt.h`, `linux/media-bus-format.h`, `linux/module.h`, `linux/of_graph.h`, `linux/platform_device.h`, `linux/regmap.h`.
- Detected declarations: `struct lt9611`, `function lt9611_mipi_input_analog`, `function lt9611_mipi_input_digital`, `function lt9611_mipi_video_setup`, `function lt9611_pcr_setup`, `function lt9611_pll_setup`, `function lt9611_read_video_check`, `function lt9611_video_check`, `function lt9611_hdmi_tx_digital`, `function lt9611_hdmi_tx_phy`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.