drivers/video/backlight/hx8357.c

Source file repositories/reference/linux-study-clean/drivers/video/backlight/hx8357.c

File Facts

System
Linux kernel
Corpus path
drivers/video/backlight/hx8357.c
Extension
.c
Size
16226 bytes
Lines
651
Domain
Driver Families
Bucket
drivers/video
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 hx8357_data {
	struct gpio_descs	*im_pins;
	struct gpio_desc	*reset;
	struct spi_device	*spi;
	int			state;
};

static u8 hx8357_seq_power[] = {
	HX8357_SET_POWER, 0x44, 0x41, 0x06,
};

static u8 hx8357_seq_vcom[] = {
	HX8357_SET_VCOM, 0x40, 0x10,
};

static u8 hx8357_seq_power_normal[] = {
	HX8357_SET_POWER_NORMAL, 0x05, 0x12,
};

static u8 hx8357_seq_panel_driving[] = {
	HX8357_SET_PANEL_DRIVING, 0x14, 0x3b, 0x00, 0x02, 0x11,
};

static u8 hx8357_seq_display_frame[] = {
	HX8357_SET_DISPLAY_FRAME, 0x0c,
};

static u8 hx8357_seq_panel_related[] = {
	HX8357_SET_PANEL_RELATED, 0x01,
};

static u8 hx8357_seq_undefined1[] = {
	0xea, 0x03, 0x00, 0x00,
};

static u8 hx8357_seq_undefined2[] = {
	0xeb, 0x40, 0x54, 0x26, 0xdb,
};

static u8 hx8357_seq_gamma[] = {
	HX8357_SET_GAMMA, 0x00, 0x15, 0x00, 0x22, 0x00,
	0x08, 0x77, 0x26, 0x77, 0x22, 0x04, 0x00,
};

static u8 hx8357_seq_address_mode[] = {
	HX8357_SET_ADDRESS_MODE, 0xc0,
};

static u8 hx8357_seq_pixel_format[] = {
	HX8357_SET_PIXEL_FORMAT,
	HX8357_SET_PIXEL_FORMAT_DPI_18BIT |
	HX8357_SET_PIXEL_FORMAT_DBI_18BIT,
};

static u8 hx8357_seq_column_address[] = {
	HX8357_SET_COLUMN_ADDRESS, 0x00, 0x00, 0x01, 0x3f,
};

static u8 hx8357_seq_page_address[] = {
	HX8357_SET_PAGE_ADDRESS, 0x00, 0x00, 0x01, 0xdf,
};

static u8 hx8357_seq_rgb[] = {
	HX8357_SET_RGB, 0x02,
};

static u8 hx8357_seq_display_mode[] = {
	HX8357_SET_DISPLAY_MODE,
	HX8357_SET_DISPLAY_MODE_RGB_THROUGH |
	HX8357_SET_DISPLAY_MODE_RGB_INTERFACE,
};

static u8 hx8369_seq_write_CABC_min_brightness[] = {
	HX8369_WRITE_CABC_MIN_BRIGHTNESS, 0x00,
};

static u8 hx8369_seq_write_CABC_control[] = {
	HX8369_WRITE_CABC_DISPLAY_VALUE, 0x24,
};

static u8 hx8369_seq_set_display_brightness[] = {
	HX8369_SET_DISPLAY_BRIGHTNESS, 0xFF,
};

static u8 hx8369_seq_write_CABC_control_setting[] = {
	HX8369_WRITE_CABC_BRIGHT_CTRL, 0x02,
};

static u8 hx8369_seq_extension_command[] = {
	HX8369_SET_EXTENSION_COMMAND, 0xff, 0x83, 0x69,

Annotation

Implementation Notes