drivers/gpu/drm/bridge/lontium-lt8912b.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/lontium-lt8912b.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/lontium-lt8912b.c- Extension
.c- Size
- 19332 bytes
- Lines
- 839
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/delay.hlinux/gpio/consumer.hlinux/i2c.hlinux/media-bus-format.hlinux/regmap.hdrm/drm_probe_helper.hdrm/drm_atomic_helper.hdrm/drm_edid.hdrm/drm_mipi_dsi.hdrm/drm_of.hvideo/videomode.h
Detected Declarations
struct lt8912function lt8912_write_init_configfunction lt8912_write_mipi_basic_configfunction lt8912_write_dds_configfunction lt8912_write_rxlogicres_configfunction lt8912_write_lvds_configfunction lt8912_init_i2cfunction lt8912_free_i2cfunction lt8912_hard_power_onfunction lt8912_hard_power_offfunction lt8912_video_setupfunction lt8912_soft_power_onfunction lt8912_video_onfunction lt8912_check_cable_statusfunction lt8912_connector_detectfunction lt8912_connector_get_modesfunction lt8912_bridge_mode_setfunction lt8912_bridge_enablefunction lt8912_attach_dsifunction lt8912_bridge_hpd_cbfunction lt8912_bridge_connector_initfunction lt8912_bridge_attachfunction lt8912_bridge_detachfunction lt8912_bridge_mode_validfunction lt8912_bridge_detectfunction lt8912_bridge_resumefunction lt8912_bridge_suspendfunction lt8912_get_regulatorsfunction lt8912_parse_dtfunction lt8912_put_dtfunction lt8912_probefunction lt8912_remove
Annotated Snippet
struct lt8912 {
struct device *dev;
struct drm_bridge bridge;
struct drm_connector connector;
struct i2c_client *i2c_client[I2C_MAX_IDX];
struct regmap *regmap[I2C_MAX_IDX];
struct device_node *host_node;
struct mipi_dsi_device *dsi;
struct gpio_desc *gp_reset;
struct videomode mode;
struct regulator_bulk_data supplies[7];
u8 data_lanes;
bool is_power_on;
};
static int lt8912_write_init_config(struct lt8912 *lt)
{
const struct reg_sequence seq[] = {
/* Digital clock en*/
{0x08, 0xff},
{0x09, 0xff},
{0x0a, 0xff},
{0x0b, 0x7c},
{0x0c, 0xff},
{0x42, 0x04},
/*Tx Analog*/
{0x31, 0xb1},
{0x32, 0xb1},
{0x33, 0x0e},
{0x37, 0x00},
{0x38, 0x22},
{0x60, 0x82},
/*Cbus Analog*/
{0x39, 0x45},
{0x3a, 0x00},
{0x3b, 0x00},
/*HDMI Pll Analog*/
{0x44, 0x31},
{0x55, 0x44},
{0x57, 0x01},
{0x5a, 0x02},
/*MIPI Analog*/
{0x3e, 0xd6},
{0x3f, 0xd4},
{0x41, 0x3c},
{0xB2, 0x00},
};
return regmap_multi_reg_write(lt->regmap[I2C_MAIN], seq, ARRAY_SIZE(seq));
}
static int lt8912_write_mipi_basic_config(struct lt8912 *lt)
{
const struct reg_sequence seq[] = {
{0x12, 0x04},
{0x14, 0x00},
{0x15, 0x00},
{0x1a, 0x03},
{0x1b, 0x03},
};
return regmap_multi_reg_write(lt->regmap[I2C_CEC_DSI], seq, ARRAY_SIZE(seq));
};
static int lt8912_write_dds_config(struct lt8912 *lt)
{
const struct reg_sequence seq[] = {
{0x4e, 0xff},
{0x4f, 0x56},
{0x50, 0x69},
{0x51, 0x80},
{0x1f, 0x5e},
{0x20, 0x01},
{0x21, 0x2c},
{0x22, 0x01},
{0x23, 0xfa},
{0x24, 0x00},
{0x25, 0xc8},
{0x26, 0x00},
Annotation
- Immediate include surface: `linux/device.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/media-bus-format.h`, `linux/regmap.h`, `drm/drm_probe_helper.h`, `drm/drm_atomic_helper.h`.
- Detected declarations: `struct lt8912`, `function lt8912_write_init_config`, `function lt8912_write_mipi_basic_config`, `function lt8912_write_dds_config`, `function lt8912_write_rxlogicres_config`, `function lt8912_write_lvds_config`, `function lt8912_init_i2c`, `function lt8912_free_i2c`, `function lt8912_hard_power_on`, `function lt8912_hard_power_off`.
- 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.
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.