drivers/gpu/drm/panel/panel-ebbg-ft8719.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-ebbg-ft8719.c- Extension
.c- Size
- 6255 bytes
- Lines
- 248
- 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/delay.hlinux/gpio/consumer.hlinux/regulator/consumer.hlinux/module.hlinux/of.hvideo/mipi_display.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct ebbg_ft8719function ebbg_ft8719_resetfunction ebbg_ft8719_onfunction ebbg_ft8719_offfunction ebbg_ft8719_preparefunction ebbg_ft8719_unpreparefunction ebbg_ft8719_get_modesfunction ebbg_ft8719_probefunction ebbg_ft8719_remove
Annotated Snippet
struct ebbg_ft8719 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct regulator_bulk_data supplies[ARRAY_SIZE(regulator_names)];
struct gpio_desc *reset_gpio;
};
static inline
struct ebbg_ft8719 *to_ebbg_ft8719(struct drm_panel *panel)
{
return container_of(panel, struct ebbg_ft8719, panel);
}
static void ebbg_ft8719_reset(struct ebbg_ft8719 *ctx)
{
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(4000, 5000);
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
usleep_range(1000, 2000);
gpiod_set_value_cansleep(ctx->reset_gpio, 0);
usleep_range(15000, 16000);
}
static int ebbg_ft8719_on(struct ebbg_ft8719 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags |= MIPI_DSI_MODE_LPM;
mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0x00ff);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x24);
mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_POWER_SAVE, 0x00);
mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 90);
mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
return dsi_ctx.accum_err;
}
static int ebbg_ft8719_off(struct ebbg_ft8719 *ctx)
{
struct mipi_dsi_device *dsi = ctx->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
mipi_dsi_usleep_range(&dsi_ctx, 10000, 11000);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
mipi_dsi_msleep(&dsi_ctx, 90);
return dsi_ctx.accum_err;
}
static int ebbg_ft8719_prepare(struct drm_panel *panel)
{
struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
int ret;
ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
if (ret < 0)
return ret;
ebbg_ft8719_reset(ctx);
ret = ebbg_ft8719_on(ctx);
if (ret < 0) {
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
return ret;
}
return 0;
}
static int ebbg_ft8719_unprepare(struct drm_panel *panel)
{
struct ebbg_ft8719 *ctx = to_ebbg_ft8719(panel);
ebbg_ft8719_off(ctx);
gpiod_set_value_cansleep(ctx->reset_gpio, 1);
regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies);
return 0;
}
static const struct drm_display_mode ebbg_ft8719_mode = {
Annotation
- Immediate include surface: `linux/delay.h`, `linux/gpio/consumer.h`, `linux/regulator/consumer.h`, `linux/module.h`, `linux/of.h`, `video/mipi_display.h`, `drm/drm_mipi_dsi.h`, `drm/drm_modes.h`.
- Detected declarations: `struct ebbg_ft8719`, `function ebbg_ft8719_reset`, `function ebbg_ft8719_on`, `function ebbg_ft8719_off`, `function ebbg_ft8719_prepare`, `function ebbg_ft8719_unprepare`, `function ebbg_ft8719_get_modes`, `function ebbg_ft8719_probe`, `function ebbg_ft8719_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.