drivers/gpu/drm/panel/panel-motorola-mot.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-motorola-mot.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-motorola-mot.c- Extension
.c- Size
- 6988 bytes
- Lines
- 245
- 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 mot_panelfunction mot_panel_resetfunction mot_es2function mot_panel_preparefunction mot_panel_disablefunction mot_panel_unpreparefunction mot_panel_get_modesfunction mot_panel_probefunction mot_panel_remove
Annotated Snippet
struct mot_panel {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator_bulk_data *supplies;
};
static inline struct mot_panel *to_mot_panel(struct drm_panel *panel)
{
return container_of(panel, struct mot_panel, panel);
}
static void mot_panel_reset(struct mot_panel *priv)
{
gpiod_set_value_cansleep(priv->reset_gpio, 1);
usleep_range(50000, 51000);
gpiod_set_value_cansleep(priv->reset_gpio, 0);
usleep_range(10000, 11000);
}
static void mot_es2(struct mipi_dsi_multi_context *ctx)
{
mipi_dsi_generic_write_seq_multi(ctx, 0x55, 0x01);
mipi_dsi_dcs_exit_sleep_mode_multi(ctx);
mipi_dsi_msleep(ctx, 120);
mipi_dsi_generic_write_seq_multi(ctx, 0xf4, 0x00, 0xbb, 0x46, 0x53, 0x0c, 0x49,
0x74, 0x29, 0x12, 0x15, 0x2f, 0x2f, 0x04);
mipi_dsi_generic_write_seq_multi(ctx, 0xf8, 0x4b, 0x04, 0x10, 0x1a, 0x2c, 0x2c,
0x2c, 0x2c, 0x14, 0x12);
mipi_dsi_generic_write_seq_multi(ctx, 0xb5, 0x03, 0x7f, 0x00, 0x80, 0xc7, 0x00);
mipi_dsi_generic_write_seq_multi(ctx, 0xb7, 0x66, 0xf6, 0x46, 0x9f, 0x90, 0x99,
0xff, 0x80, 0x6d, 0x01);
/* Gamma R */
mipi_dsi_generic_write_seq_multi(ctx, 0xf9, 0x04);
mipi_dsi_generic_write_seq_multi(ctx, 0xfa, 0x00, 0x2f, 0x30, 0x12, 0x0e, 0x0c,
0x22, 0x27, 0x31, 0x2e, 0x07, 0x0f);
mipi_dsi_generic_write_seq_multi(ctx, 0xfb, 0x00, 0x2f, 0x30, 0x12, 0x0e, 0x0c,
0x22, 0x27, 0x31, 0x2e, 0x07, 0x0f);
/* Gamma G */
mipi_dsi_generic_write_seq_multi(ctx, 0xf9, 0x02);
mipi_dsi_generic_write_seq_multi(ctx, 0xfa, 0x00, 0x2f, 0x37, 0x15, 0x15, 0x11,
0x1f, 0x25, 0x2d, 0x2a, 0x05, 0x0f);
mipi_dsi_generic_write_seq_multi(ctx, 0xfb, 0x00, 0x2f, 0x37, 0x15, 0x15, 0x11,
0x1f, 0x25, 0x2d, 0x2a, 0x05, 0x0f);
/* Gamma B */
mipi_dsi_generic_write_seq_multi(ctx, 0xf9, 0x01);
mipi_dsi_generic_write_seq_multi(ctx, 0xfa, 0x00, 0x2f, 0x3f, 0x16, 0x1f, 0x15,
0x1f, 0x25, 0x2d, 0x2b, 0x06, 0x0b);
mipi_dsi_generic_write_seq_multi(ctx, 0xfb, 0x00, 0x2f, 0x3f, 0x16, 0x1f, 0x15,
0x1f, 0x25, 0x2d, 0x2b, 0x06, 0x0b);
/* Gamma W */
mipi_dsi_generic_write_seq_multi(ctx, 0xf9, 0x20);
mipi_dsi_generic_write_seq_multi(ctx, 0xfa, 0x00, 0x2f, 0x34, 0x15, 0x1a, 0x11,
0x1f, 0x23, 0x2d, 0x29, 0x02, 0x08);
mipi_dsi_generic_write_seq_multi(ctx, 0xfb, 0x00, 0x2f, 0x34, 0x15, 0x1a, 0x11,
0x1f, 0x23, 0x2d, 0x29, 0x02, 0x08);
mipi_dsi_generic_write_seq_multi(ctx, 0x53, 0x2c);
mipi_dsi_generic_write_seq_multi(ctx, 0x35, 0x00);
}
static int mot_panel_prepare(struct drm_panel *panel)
{
struct mot_panel *priv = to_mot_panel(panel);
struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
struct device *dev = panel->dev;
int ret;
ret = regulator_bulk_enable(ARRAY_SIZE(mot_panel_supplies), priv->supplies);
if (ret < 0) {
dev_err(dev, "failed to enable power supplies: %d\n", ret);
return ret;
}
mot_panel_reset(priv);
mipi_dsi_generic_write_seq_multi(&ctx, 0xf0, 0x5a, 0x5a);
mipi_dsi_generic_write_seq_multi(&ctx, 0xf1, 0x5a, 0x5a);
mipi_dsi_generic_write_seq_multi(&ctx, 0xd0, 0x8e);
mot_es2(&ctx);
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 mot_panel`, `function mot_panel_reset`, `function mot_es2`, `function mot_panel_prepare`, `function mot_panel_disable`, `function mot_panel_unprepare`, `function mot_panel_get_modes`, `function mot_panel_probe`, `function mot_panel_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.