drivers/gpu/drm/panel/panel-renesas-r69328.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-renesas-r69328.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-renesas-r69328.c- Extension
.c- Size
- 7115 bytes
- Lines
- 256
- 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 renesas_r69328function renesas_r69328_resetfunction renesas_r69328_preparefunction renesas_r69328_enablefunction renesas_r69328_disablefunction renesas_r69328_unpreparefunction renesas_r69328_get_modesfunction renesas_r69328_probefunction renesas_r69328_remove
Annotated Snippet
struct renesas_r69328 {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct regulator *vdd_supply;
struct regulator *vddio_supply;
struct gpio_desc *reset_gpio;
};
static inline struct renesas_r69328 *to_renesas_r69328(struct drm_panel *panel)
{
return container_of(panel, struct renesas_r69328, panel);
}
static void renesas_r69328_reset(struct renesas_r69328 *priv)
{
gpiod_set_value_cansleep(priv->reset_gpio, 1);
usleep_range(10000, 11000);
gpiod_set_value_cansleep(priv->reset_gpio, 0);
usleep_range(2000, 3000);
}
static int renesas_r69328_prepare(struct drm_panel *panel)
{
struct renesas_r69328 *priv = to_renesas_r69328(panel);
struct device *dev = &priv->dsi->dev;
int ret;
ret = regulator_enable(priv->vdd_supply);
if (ret) {
dev_err(dev, "failed to enable vdd power supply\n");
return ret;
}
usleep_range(10000, 11000);
ret = regulator_enable(priv->vddio_supply);
if (ret < 0) {
dev_err(dev, "failed to enable vddio power supply\n");
return ret;
}
usleep_range(10000, 11000);
renesas_r69328_reset(priv);
return 0;
}
static int renesas_r69328_enable(struct drm_panel *panel)
{
struct renesas_r69328 *priv = to_renesas_r69328(panel);
struct mipi_dsi_multi_context ctx = { .dsi = priv->dsi };
/* Set address mode */
mipi_dsi_dcs_write_seq_multi(&ctx, MIPI_DCS_SET_ADDRESS_MODE, 0x00);
mipi_dsi_dcs_set_pixel_format_multi(&ctx, MIPI_DCS_PIXEL_FMT_24BIT << 4);
mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
mipi_dsi_msleep(&ctx, 100);
/* MACP Off */
mipi_dsi_generic_write_seq_multi(&ctx, R69328_MACP, R69328_MACP_OFF);
mipi_dsi_generic_write_seq_multi(&ctx, R69328_POWER_SET, 0x14, 0x1d,
0x21, 0x67, 0x11, 0x9a);
mipi_dsi_generic_write_seq_multi(&ctx, R69328_GAMMA_SET_A, 0x00, 0x1a,
0x20, 0x28, 0x25, 0x24, 0x26, 0x15, 0x13,
0x11, 0x18, 0x1e, 0x1c, 0x00, 0x00, 0x1a,
0x20, 0x28, 0x25, 0x24, 0x26, 0x15, 0x13,
0x11, 0x18, 0x1e, 0x1c, 0x00);
mipi_dsi_generic_write_seq_multi(&ctx, R69328_GAMMA_SET_B, 0x00, 0x1a,
0x20, 0x28, 0x25, 0x24, 0x26, 0x15, 0x13,
0x11, 0x18, 0x1e, 0x1c, 0x00, 0x00, 0x1a,
0x20, 0x28, 0x25, 0x24, 0x26, 0x15, 0x13,
0x11, 0x18, 0x1e, 0x1c, 0x00);
mipi_dsi_generic_write_seq_multi(&ctx, R69328_GAMMA_SET_C, 0x00, 0x1a,
0x20, 0x28, 0x25, 0x24, 0x26, 0x15, 0x13,
0x11, 0x18, 0x1e, 0x1c, 0x00, 0x00, 0x1a,
0x20, 0x28, 0x25, 0x24, 0x26, 0x15, 0x13,
0x11, 0x18, 0x1e, 0x1c, 0x00);
/* MACP On */
mipi_dsi_generic_write_seq_multi(&ctx, R69328_MACP, R69328_MACP_ON);
mipi_dsi_dcs_set_display_on_multi(&ctx);
mipi_dsi_msleep(&ctx, 50);
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 renesas_r69328`, `function renesas_r69328_reset`, `function renesas_r69328_prepare`, `function renesas_r69328_enable`, `function renesas_r69328_disable`, `function renesas_r69328_unprepare`, `function renesas_r69328_get_modes`, `function renesas_r69328_probe`, `function renesas_r69328_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.