drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c- Extension
.c- Size
- 5964 bytes
- Lines
- 259
- 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
drm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.hlinux/gpio/consumer.hlinux/delay.hlinux/module.hlinux/mod_devicetable.hlinux/regulator/consumer.h
Detected Declarations
struct feiyangstruct feiyang_init_cmdfunction feiyang_preparefunction feiyang_enablefunction feiyang_disablefunction feiyang_unpreparefunction feiyang_get_modesfunction feiyang_dsi_probefunction feiyang_dsi_remove
Annotated Snippet
struct feiyang {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct regulator *dvdd;
struct regulator *avdd;
struct gpio_desc *reset;
};
static inline struct feiyang *panel_to_feiyang(struct drm_panel *panel)
{
return container_of(panel, struct feiyang, panel);
}
struct feiyang_init_cmd {
u8 data[FEIYANG_INIT_CMD_LEN];
};
static const struct feiyang_init_cmd feiyang_init_cmds[] = {
{ .data = { 0x80, 0x58 } },
{ .data = { 0x81, 0x47 } },
{ .data = { 0x82, 0xD4 } },
{ .data = { 0x83, 0x88 } },
{ .data = { 0x84, 0xA9 } },
{ .data = { 0x85, 0xC3 } },
{ .data = { 0x86, 0x82 } },
};
static int feiyang_prepare(struct drm_panel *panel)
{
struct feiyang *ctx = panel_to_feiyang(panel);
struct mipi_dsi_device *dsi = ctx->dsi;
unsigned int i;
int ret;
ret = regulator_enable(ctx->dvdd);
if (ret)
return ret;
/* T1 (dvdd start + dvdd rise) 0 < T1 <= 10ms */
msleep(10);
ret = regulator_enable(ctx->avdd);
if (ret)
return ret;
/* T3 (dvdd rise + avdd start + avdd rise) T3 >= 20ms */
msleep(20);
gpiod_set_value(ctx->reset, 0);
/*
* T5 + T6 (avdd rise + video & logic signal rise)
* T5 >= 10ms, 0 < T6 <= 10ms
*/
msleep(20);
gpiod_set_value(ctx->reset, 1);
/* T12 (video & logic signal rise + backlight rise) T12 >= 200ms */
msleep(200);
for (i = 0; i < ARRAY_SIZE(feiyang_init_cmds); i++) {
const struct feiyang_init_cmd *cmd =
&feiyang_init_cmds[i];
ret = mipi_dsi_dcs_write_buffer(dsi, cmd->data,
FEIYANG_INIT_CMD_LEN);
if (ret < 0)
return ret;
}
return 0;
}
static int feiyang_enable(struct drm_panel *panel)
{
struct feiyang *ctx = panel_to_feiyang(panel);
/* T12 (video & logic signal rise + backlight rise) T12 >= 200ms */
msleep(200);
return mipi_dsi_dcs_set_display_on(ctx->dsi);
}
static int feiyang_disable(struct drm_panel *panel)
{
struct feiyang *ctx = panel_to_feiyang(panel);
return mipi_dsi_dcs_set_display_off(ctx->dsi);
Annotation
- Immediate include surface: `drm/drm_mipi_dsi.h`, `drm/drm_modes.h`, `drm/drm_panel.h`, `linux/gpio/consumer.h`, `linux/delay.h`, `linux/module.h`, `linux/mod_devicetable.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct feiyang`, `struct feiyang_init_cmd`, `function feiyang_prepare`, `function feiyang_enable`, `function feiyang_disable`, `function feiyang_unprepare`, `function feiyang_get_modes`, `function feiyang_dsi_probe`, `function feiyang_dsi_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.