drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c- Extension
.c- Size
- 13262 bytes
- Lines
- 493
- 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
linux/backlight.hlinux/delay.hlinux/gpio/consumer.hlinux/module.hlinux/regulator/consumer.hlinux/of.hvideo/mipi_display.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct s6d7aa0struct s6d7aa0_panel_descenum s6d7aa0_panelsfunction s6d7aa0_resetfunction s6d7aa0_lockfunction s6d7aa0_onfunction s6d7aa0_offfunction s6d7aa0_preparefunction s6d7aa0_disablefunction s6d7aa0_unpreparefunction s6d7aa0_bl_update_statusfunction s6d7aa0_bl_get_brightnessfunction s6d7aa0_create_backlightfunction s6d7aa0_lsl080al02_initfunction s6d7aa0_lsl080al02_offfunction s6d7aa0_lsl080al03_initfunction s6d7aa0_lsl080al03_offfunction s6d7aa0_get_modesfunction s6d7aa0_probefunction s6d7aa0_remove
Annotated Snippet
struct s6d7aa0 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data supplies[2];
const struct s6d7aa0_panel_desc *desc;
};
struct s6d7aa0_panel_desc {
unsigned int panel_type;
void (*init_func)(struct s6d7aa0 *ctx, struct mipi_dsi_multi_context *dsi_ctx);
void (*off_func)(struct mipi_dsi_multi_context *dsi_ctx);
const struct drm_display_mode *drm_mode;
unsigned long mode_flags;
u32 bus_flags;
bool has_backlight;
bool use_passwd3;
};
enum s6d7aa0_panels {
S6D7AA0_PANEL_LSL080AL02,
S6D7AA0_PANEL_LSL080AL03,
S6D7AA0_PANEL_LTL101AT01,
};
static inline struct s6d7aa0 *panel_to_s6d7aa0(struct drm_panel *panel)
{
return container_of(panel, struct s6d7aa0, panel);
}
static void s6d7aa0_reset(struct s6d7aa0 *ctx)
{
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
msleep(50);
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
msleep(50);
}
static void s6d7aa0_lock(struct s6d7aa0 *ctx, struct mipi_dsi_multi_context *dsi_ctx, bool lock)
{
if (lock) {
mipi_dsi_dcs_write_seq_multi(dsi_ctx, MCS_PASSWD1, 0xa5, 0xa5);
mipi_dsi_dcs_write_seq_multi(dsi_ctx, MCS_PASSWD2, 0xa5, 0xa5);
if (ctx->desc->use_passwd3)
mipi_dsi_dcs_write_seq_multi(dsi_ctx, MCS_PASSWD3, 0x5a, 0x5a);
} else {
mipi_dsi_dcs_write_seq_multi(dsi_ctx, MCS_PASSWD1, 0x5a, 0x5a);
mipi_dsi_dcs_write_seq_multi(dsi_ctx, MCS_PASSWD2, 0x5a, 0x5a);
if (ctx->desc->use_passwd3)
mipi_dsi_dcs_write_seq_multi(dsi_ctx, MCS_PASSWD3, 0xa5, 0xa5);
}
}
static int s6d7aa0_on(struct s6d7aa0 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
ctx->desc->init_func(ctx, &dsi_ctx);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
return dsi_ctx.accum_err;
}
static void s6d7aa0_off(struct s6d7aa0 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
ctx->desc->off_func(&dsi_ctx);
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 64);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 120);
}
static int s6d7aa0_prepare(struct drm_panel *panel)
{
struct s6d7aa0 *ctx = panel_to_s6d7aa0(panel);
int ret;
ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
if (ret < 0)
return ret;
s6d7aa0_reset(ctx);
Annotation
- Immediate include surface: `linux/backlight.h`, `linux/delay.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/regulator/consumer.h`, `linux/of.h`, `video/mipi_display.h`, `drm/drm_mipi_dsi.h`.
- Detected declarations: `struct s6d7aa0`, `struct s6d7aa0_panel_desc`, `enum s6d7aa0_panels`, `function s6d7aa0_reset`, `function s6d7aa0_lock`, `function s6d7aa0_on`, `function s6d7aa0_off`, `function s6d7aa0_prepare`, `function s6d7aa0_disable`, `function s6d7aa0_unprepare`.
- 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.