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.
- 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.
- 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/delay.hlinux/gpio/consumer.hlinux/lcd.hlinux/mod_devicetable.hlinux/module.hlinux/property.hlinux/spi/spi.h
Detected Declarations
struct hx8357_datafunction hx8357_spi_write_then_readfunction hx8357_spi_write_arrayfunction hx8357_spi_write_bytefunction hx8357_enter_standbyfunction hx8357_exit_standbyfunction hx8357_lcd_resetfunction hx8357_lcd_initfunction hx8369_lcd_initfunction hx8357_set_powerfunction hx8357_get_powerfunction hx8357_probe
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
- Immediate include surface: `linux/delay.h`, `linux/gpio/consumer.h`, `linux/lcd.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/property.h`, `linux/spi/spi.h`.
- Detected declarations: `struct hx8357_data`, `function hx8357_spi_write_then_read`, `function hx8357_spi_write_array`, `function hx8357_spi_write_byte`, `function hx8357_enter_standby`, `function hx8357_exit_standby`, `function hx8357_lcd_reset`, `function hx8357_lcd_init`, `function hx8369_lcd_init`, `function hx8357_set_power`.
- Atlas domain: Driver Families / drivers/video.
- 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.