drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c- Extension
.c- Size
- 6102 bytes
- Lines
- 238
- 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/device.hlinux/err.hlinux/errno.hlinux/kernel.hlinux/media-bus-format.hlinux/module.hlinux/of.hlinux/gpio/consumer.hlinux/regulator/consumer.hdrm/drm_connector.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct rb070d30_panelfunction rb070d30_panel_preparefunction rb070d30_panel_unpreparefunction rb070d30_panel_enablefunction rb070d30_panel_disablefunction rb070d30_panel_get_modesfunction rb070d30_panel_dsi_probefunction rb070d30_panel_dsi_remove
Annotated Snippet
struct rb070d30_panel {
struct drm_panel panel;
struct mipi_dsi_device *dsi;
struct regulator *supply;
struct {
struct gpio_desc *power;
struct gpio_desc *reset;
struct gpio_desc *updn;
struct gpio_desc *shlr;
} gpios;
};
static inline struct rb070d30_panel *panel_to_rb070d30_panel(struct drm_panel *panel)
{
return container_of(panel, struct rb070d30_panel, panel);
}
static int rb070d30_panel_prepare(struct drm_panel *panel)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
int ret;
ret = regulator_enable(ctx->supply);
if (ret < 0) {
dev_err(&ctx->dsi->dev, "Failed to enable supply: %d\n", ret);
return ret;
}
msleep(20);
gpiod_set_value_cansleep(ctx->gpios.power, 1);
msleep(20);
gpiod_set_value_cansleep(ctx->gpios.reset, 1);
msleep(20);
return 0;
}
static int rb070d30_panel_unprepare(struct drm_panel *panel)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
gpiod_set_value_cansleep(ctx->gpios.reset, 0);
gpiod_set_value_cansleep(ctx->gpios.power, 0);
regulator_disable(ctx->supply);
return 0;
}
static int rb070d30_panel_enable(struct drm_panel *panel)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
return mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
}
static int rb070d30_panel_disable(struct drm_panel *panel)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
return mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
}
/* Default timings */
static const struct drm_display_mode default_mode = {
.clock = 51206,
.hdisplay = 1024,
.hsync_start = 1024 + 160,
.hsync_end = 1024 + 160 + 80,
.htotal = 1024 + 160 + 80 + 80,
.vdisplay = 600,
.vsync_start = 600 + 12,
.vsync_end = 600 + 12 + 10,
.vtotal = 600 + 12 + 10 + 13,
.width_mm = 154,
.height_mm = 85,
};
static int rb070d30_panel_get_modes(struct drm_panel *panel,
struct drm_connector *connector)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
struct drm_display_mode *mode;
static const u32 bus_format = MEDIA_BUS_FMT_RGB888_1X24;
mode = drm_mode_duplicate(connector->dev, &default_mode);
if (!mode) {
dev_err(&ctx->dsi->dev, "Failed to add mode " DRM_MODE_FMT "\n",
DRM_MODE_ARG(&default_mode));
return -EINVAL;
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/errno.h`, `linux/kernel.h`, `linux/media-bus-format.h`, `linux/module.h`, `linux/of.h`.
- Detected declarations: `struct rb070d30_panel`, `function rb070d30_panel_prepare`, `function rb070d30_panel_unprepare`, `function rb070d30_panel_enable`, `function rb070d30_panel_disable`, `function rb070d30_panel_get_modes`, `function rb070d30_panel_dsi_probe`, `function rb070d30_panel_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.