drivers/gpu/drm/panel/panel-ilitek-ili9805.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-ilitek-ili9805.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/panel/panel-ilitek-ili9805.c
Extension
.c
Size
10367 bytes
Lines
406
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ili9805_instr {
	size_t len;
	const u8 *data;
	u32 delay;
};

struct ili9805_desc {
	const char *name;
	const struct ili9805_instr *init;
	const size_t init_length;
	const struct drm_display_mode *mode;
	u32 width_mm;
	u32 height_mm;
};

struct ili9805 {
	struct drm_panel	panel;
	struct mipi_dsi_device	*dsi;
	const struct ili9805_desc	*desc;

	struct regulator	*dvdd;
	struct regulator	*avdd;
	struct gpio_desc	*reset_gpio;
};

static const struct ili9805_instr gpm1780a0_init[] = {
	ILI9805_INSTR(100, ILI9805_EXTCMD_CMD_SET_ENABLE_REG, ILI9805_SETEXTC_PARAMETER1,
		      ILI9805_SETEXTC_PARAMETER2, ILI9805_SETEXTC_PARAMETER3),
	ILI9805_INSTR(100, 0xFD, 0x0F, 0x10, 0x44, 0x00),
	ILI9805_INSTR(0, 0xf8, 0x18, 0x02, 0x02, 0x18, 0x02, 0x02, 0x30, 0x00,
		      0x00, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00),
	ILI9805_INSTR(0, 0xB8, 0x62),
	ILI9805_INSTR(0, 0xF1, 0x00),
	ILI9805_INSTR(0, 0xF2, 0x00, 0x58, 0x40),
	ILI9805_INSTR(0, 0xF3, 0x60, 0x83, 0x04),
	ILI9805_INSTR(0, 0xFC, 0x04, 0x0F, 0x01),
	ILI9805_INSTR(0, 0xEB, 0x08, 0x0F),
	ILI9805_INSTR(0, 0xe0, 0x00, 0x08, 0x0d, 0x0e, 0x0e, 0x0d, 0x0a, 0x08, 0x04,
		      0x08, 0x0d, 0x0f, 0x0b, 0x1c, 0x14, 0x0a),
	ILI9805_INSTR(0, 0xe1, 0x00, 0x08, 0x0d, 0x0e, 0x0e, 0x0d, 0x0a, 0x08, 0x04,
		      0x08, 0x0d, 0x0f, 0x0b, 0x1c, 0x14, 0x0a),
	ILI9805_INSTR(10, 0xc1, 0x13, 0x39, 0x19, 0x06),
	ILI9805_INSTR(10, 0xc7, 0xe5),
	ILI9805_INSTR(10, 0xB1, 0x00, 0x12, 0x14),
	ILI9805_INSTR(10, 0xB4, 0x02),
	ILI9805_INSTR(0, 0xBB, 0x14, 0x55),
	ILI9805_INSTR(0, MIPI_DCS_SET_ADDRESS_MODE, 0x08),
	ILI9805_INSTR(0, MIPI_DCS_SET_PIXEL_FORMAT, 0x77),
	ILI9805_INSTR(0, 0x20),
	ILI9805_INSTR(0, 0xB0, 0x01),
	ILI9805_INSTR(0, 0xB6, 0x31, 0x00, 0xef),
	ILI9805_INSTR(0, 0xDF, 0x23),
	ILI9805_INSTR(0, 0xB9, 0x02, 0x00),
};

static const struct ili9805_instr tm041xdhg01_init[] = {
	ILI9805_INSTR(100, ILI9805_EXTCMD_CMD_SET_ENABLE_REG, ILI9805_SETEXTC_PARAMETER1,
		      ILI9805_SETEXTC_PARAMETER2, ILI9805_SETEXTC_PARAMETER3),
	ILI9805_INSTR(100, 0xFD, 0x0F, 0x13, 0x44, 0x00),
	ILI9805_INSTR(0, 0xf8, 0x18, 0x02, 0x02, 0x18, 0x02, 0x02, 0x30, 0x01,
		      0x01, 0x30, 0x01, 0x01, 0x30, 0x01, 0x01),
	ILI9805_INSTR(0, 0xB8, 0x74),
	ILI9805_INSTR(0, 0xF1, 0x00),
	ILI9805_INSTR(0, 0xF2, 0x00, 0x58, 0x40),
	ILI9805_INSTR(0, 0xFC, 0x04, 0x0F, 0x01),
	ILI9805_INSTR(0, 0xEB, 0x08, 0x0F),
	ILI9805_INSTR(0, 0xe0, 0x01, 0x0d, 0x15, 0x0e, 0x0f, 0x0f, 0x0b, 0x08, 0x04,
		      0x07, 0x0a, 0x0d, 0x0c, 0x15, 0x0f, 0x08),
	ILI9805_INSTR(0, 0xe1, 0x01, 0x0d, 0x15, 0x0e, 0x0f, 0x0f, 0x0b, 0x08, 0x04,
		      0x07, 0x0a, 0x0d, 0x0c, 0x15, 0x0f, 0x08),
	ILI9805_INSTR(10, 0xc1, 0x15, 0x03, 0x03, 0x31),
	ILI9805_INSTR(10, 0xB1, 0x00, 0x12, 0x14),
	ILI9805_INSTR(10, 0xB4, 0x02),
	ILI9805_INSTR(0, 0xBB, 0x14, 0x55),
	ILI9805_INSTR(0, MIPI_DCS_SET_ADDRESS_MODE, 0x0a),
	ILI9805_INSTR(0, MIPI_DCS_SET_PIXEL_FORMAT, 0x77),
	ILI9805_INSTR(0, 0x20),
	ILI9805_INSTR(0, 0xB0, 0x00),
	ILI9805_INSTR(0, 0xB6, 0x01),
	ILI9805_INSTR(0, 0xc2, 0x11),
	ILI9805_INSTR(0, 0x51, 0xFF),
	ILI9805_INSTR(0, 0x53, 0x24),
	ILI9805_INSTR(0, 0x55, 0x00),
};

static inline struct ili9805 *panel_to_ili9805(struct drm_panel *panel)
{
	return container_of(panel, struct ili9805, panel);
}

Annotation

Implementation Notes