drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-samsung-ltl106hl02.c- Extension
.c- Size
- 4873 bytes
- Lines
- 180
- 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/array_size.hlinux/delay.hlinux/err.hlinux/gpio/consumer.hlinux/mod_devicetable.hlinux/module.hlinux/property.hlinux/regulator/consumer.hvideo/mipi_display.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.hdrm/drm_probe_helper.h
Detected Declarations
struct samsung_ltl106hl02function samsung_ltl106hl02_resetfunction samsung_ltl106hl02_preparefunction samsung_ltl106hl02_unpreparefunction samsung_ltl106hl02_get_modesfunction samsung_ltl106hl02_probefunction samsung_ltl106hl02_remove
Annotated Snippet
struct samsung_ltl106hl02 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct regulator *supply;
struct gpio_desc *reset_gpio;
};
static inline struct samsung_ltl106hl02 *to_samsung_ltl106hl02(struct drm_panel *panel)
{
return container_of(panel, struct samsung_ltl106hl02, panel);
}
static void samsung_ltl106hl02_reset(struct samsung_ltl106hl02 *ctx)
{
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
usleep_range(10000, 11000);
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(2000, 3000);
}
static int samsung_ltl106hl02_prepare(struct drm_panel *panel)
{
struct samsung_ltl106hl02 *ctx = to_samsung_ltl106hl02(panel);
struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
struct device *dev = &ctx->dsi->dev;
int ret;
ret = regulator_enable(ctx->supply);
if (ret < 0) {
dev_err(dev, "failed to enable power supply %d\n", ret);
return ret;
}
if (ctx->reset_gpio)
samsung_ltl106hl02_reset(ctx);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 70);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 5);
return dsi_ctx.accum_err;
}
static int samsung_ltl106hl02_unprepare(struct drm_panel *panel)
{
struct samsung_ltl106hl02 *ctx = to_samsung_ltl106hl02(panel);
struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 50);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 150);
if (ctx->reset_gpio)
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_disable(ctx->supply);
return 0;
}
static const struct drm_display_mode samsung_ltl106hl02_mode = {
.clock = (1920 + 32 + 32 + 64) * (1080 + 6 + 3 + 22) * 60 / 1000,
.hdisplay = 1920,
.hsync_start = 1920 + 32,
.hsync_end = 1920 + 32 + 32,
.htotal = 1920 + 32 + 32 + 64,
.vdisplay = 1080,
.vsync_start = 1080 + 6,
.vsync_end = 1080 + 6 + 3,
.vtotal = 1080 + 6 + 3 + 22,
.width_mm = 235,
.height_mm = 132,
.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
};
static int samsung_ltl106hl02_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
return drm_connector_helper_get_modes_fixed(connector, &samsung_ltl106hl02_mode);
}
static const struct drm_panel_funcs samsung_ltl106hl02_panel_funcs = {
.prepare = samsung_ltl106hl02_prepare,
.unprepare = samsung_ltl106hl02_unprepare,
.get_modes = samsung_ltl106hl02_get_modes,
};
Annotation
- Immediate include surface: `linux/array_size.h`, `linux/delay.h`, `linux/err.h`, `linux/gpio/consumer.h`, `linux/mod_devicetable.h`, `linux/module.h`, `linux/property.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct samsung_ltl106hl02`, `function samsung_ltl106hl02_reset`, `function samsung_ltl106hl02_prepare`, `function samsung_ltl106hl02_unprepare`, `function samsung_ltl106hl02_get_modes`, `function samsung_ltl106hl02_probe`, `function samsung_ltl106hl02_remove`.
- 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.