drivers/gpu/drm/bridge/lontium-lt9611uxc.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/bridge/lontium-lt9611uxc.c- Extension
.c- Size
- 23975 bytes
- Lines
- 926
- 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.
- 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/firmware.hlinux/gpio/consumer.hlinux/i2c.hlinux/interrupt.hlinux/module.hlinux/mutex.hlinux/of_graph.hlinux/platform_device.hlinux/regmap.hlinux/regulator/consumer.hlinux/wait.hlinux/workqueue.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_audio_helper.h
Detected Declarations
struct lt9611uxcstruct lt9611uxc_modefunction lt9611uxc_lockfunction lt9611uxc_unlockfunction lt9611uxc_irq_thread_handlerfunction lt9611uxc_hpd_workfunction lt9611uxc_resetfunction lt9611uxc_assert_5vfunction lt9611uxc_regulator_initfunction lt9611uxc_regulator_enablefunction lt9611uxc_bridge_attachfunction lt9611uxc_bridge_mode_validfunction lt9611uxc_video_setupfunction lt9611uxc_bridge_mode_setfunction lt9611uxc_bridge_detectfunction lt9611uxc_wait_for_edidfunction lt9611uxc_get_edid_blockfunction lt9611uxc_bridge_hpd_notifyfunction lt9611uxc_hdmi_audio_preparefunction lt9611uxc_hdmi_audio_shutdownfunction lt9611uxc_parse_dtfunction lt9611uxc_gpio_initfunction lt9611uxc_read_device_revfunction lt9611uxc_read_versionfunction lt9611uxc_firmware_write_pagefunction lt9611uxc_firmware_read_pagefunction lt9611uxc_firmware_updatefunction lt9611uxc_firmware_storefunction lt9611uxc_firmware_showfunction lt9611uxc_probefunction lt9611uxc_remove
Annotated Snippet
struct lt9611uxc {
struct device *dev;
struct drm_bridge bridge;
struct regmap *regmap;
/* Protects all accesses to registers by stopping the on-chip MCU */
struct mutex ocm_lock;
struct wait_queue_head wq;
struct work_struct work;
struct device_node *dsi0_node;
struct device_node *dsi1_node;
struct mipi_dsi_device *dsi0;
struct mipi_dsi_device *dsi1;
struct gpio_desc *reset_gpio;
struct gpio_desc *enable_gpio;
struct regulator_bulk_data supplies[2];
struct i2c_client *client;
bool hpd_supported;
bool edid_read;
/* can be accessed from different threads, so protect this with ocm_lock */
bool hdmi_connected;
uint8_t fw_version;
};
#define LT9611_PAGE_CONTROL 0xff
static const struct regmap_range_cfg lt9611uxc_ranges[] = {
{
.name = "register_range",
.range_min = 0,
.range_max = 0xd0ff,
.selector_reg = LT9611_PAGE_CONTROL,
.selector_mask = 0xff,
.selector_shift = 0,
.window_start = 0,
.window_len = 0x100,
},
};
static const struct regmap_config lt9611uxc_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
.max_register = 0xffff,
.ranges = lt9611uxc_ranges,
.num_ranges = ARRAY_SIZE(lt9611uxc_ranges),
};
struct lt9611uxc_mode {
u16 hdisplay;
u16 vdisplay;
u8 vrefresh;
};
/*
* This chip supports only a fixed set of modes.
* Enumerate them here to check whether the mode is supported.
*/
static struct lt9611uxc_mode lt9611uxc_modes[] = {
{ 1920, 1080, 60 },
{ 1920, 1080, 30 },
{ 1920, 1080, 25 },
{ 1366, 768, 60 },
{ 1360, 768, 60 },
{ 1280, 1024, 60 },
{ 1280, 800, 60 },
{ 1280, 720, 60 },
{ 1280, 720, 50 },
{ 1280, 720, 30 },
{ 1152, 864, 60 },
{ 1024, 768, 60 },
{ 800, 600, 60 },
{ 720, 576, 50 },
{ 720, 480, 60 },
{ 640, 480, 60 },
};
static struct lt9611uxc *bridge_to_lt9611uxc(struct drm_bridge *bridge)
{
return container_of(bridge, struct lt9611uxc, bridge);
}
static void lt9611uxc_lock(struct lt9611uxc *lt9611uxc)
{
mutex_lock(<9611uxc->ocm_lock);
Annotation
- Immediate include surface: `linux/firmware.h`, `linux/gpio/consumer.h`, `linux/i2c.h`, `linux/interrupt.h`, `linux/module.h`, `linux/mutex.h`, `linux/of_graph.h`, `linux/platform_device.h`.
- Detected declarations: `struct lt9611uxc`, `struct lt9611uxc_mode`, `function lt9611uxc_lock`, `function lt9611uxc_unlock`, `function lt9611uxc_irq_thread_handler`, `function lt9611uxc_hpd_work`, `function lt9611uxc_reset`, `function lt9611uxc_assert_5v`, `function lt9611uxc_regulator_init`, `function lt9611uxc_regulator_enable`.
- 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.