drivers/gpu/drm/panel/panel-tpo-tpg110.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-tpo-tpg110.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-tpo-tpg110.c- Extension
.c- Size
- 11500 bytes
- Lines
- 487
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/drm_modes.hdrm/drm_panel.hlinux/bitops.hlinux/delay.hlinux/gpio/consumer.hlinux/init.hlinux/kernel.hlinux/module.hlinux/of.hlinux/platform_device.hlinux/spi/spi.h
Detected Declarations
struct tpg110_panel_modestruct tpg110function to_tpg110function tpg110_readwrite_regfunction tpg110_read_regfunction tpg110_write_regfunction tpg110_startupfunction tpg110_disablefunction tpg110_enablefunction tpg110_get_modesfunction tpg110_probefunction tpg110_remove
Annotated Snippet
struct tpg110_panel_mode {
/**
* @name: the name of this panel
*/
const char *name;
/**
* @magic: the magic value from the detection register
*/
u32 magic;
/**
* @mode: the DRM display mode for this panel
*/
struct drm_display_mode mode;
/**
* @bus_flags: the DRM bus flags for this panel e.g. inverted clock
*/
u32 bus_flags;
};
/**
* struct tpg110 - state container for the TPG110 panel
*/
struct tpg110 {
/**
* @dev: the container device
*/
struct device *dev;
/**
* @spi: the corresponding SPI device
*/
struct spi_device *spi;
/**
* @panel: the DRM panel instance for this device
*/
struct drm_panel panel;
/**
* @panel_mode: the panel mode as detected
*/
const struct tpg110_panel_mode *panel_mode;
/**
* @width: the width of this panel in mm
*/
u32 width;
/**
* @height: the height of this panel in mm
*/
u32 height;
/**
* @grestb: reset GPIO line
*/
struct gpio_desc *grestb;
};
/*
* TPG110 modes, these are the simple modes, the dualscan modes that
* take 400x240 or 480x272 in and display as 800x480 are not listed.
*/
static const struct tpg110_panel_mode tpg110_modes[] = {
{
.name = "800x480 RGB",
.magic = TPG110_RES_800X480,
.mode = {
.clock = 33200,
.hdisplay = 800,
.hsync_start = 800 + 40,
.hsync_end = 800 + 40 + 1,
.htotal = 800 + 40 + 1 + 216,
.vdisplay = 480,
.vsync_start = 480 + 10,
.vsync_end = 480 + 10 + 1,
.vtotal = 480 + 10 + 1 + 35,
},
.bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
},
{
.name = "640x480 RGB",
.magic = TPG110_RES_640X480,
.mode = {
.clock = 25200,
.hdisplay = 640,
.hsync_start = 640 + 24,
.hsync_end = 640 + 24 + 1,
.htotal = 640 + 24 + 1 + 136,
.vdisplay = 480,
.vsync_start = 480 + 18,
.vsync_end = 480 + 18 + 1,
.vtotal = 480 + 18 + 1 + 27,
},
.bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
},
Annotation
- Immediate include surface: `drm/drm_modes.h`, `drm/drm_panel.h`, `linux/bitops.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/init.h`, `linux/kernel.h`, `linux/module.h`.
- Detected declarations: `struct tpg110_panel_mode`, `struct tpg110`, `function to_tpg110`, `function tpg110_readwrite_reg`, `function tpg110_read_reg`, `function tpg110_write_reg`, `function tpg110_startup`, `function tpg110_disable`, `function tpg110_enable`, `function tpg110_get_modes`.
- Atlas domain: Driver Families / drivers/gpu.
- 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.