drivers/gpu/drm/panel/panel-synaptics-r63353.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-synaptics-r63353.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-synaptics-r63353.c- Extension
.c- Size
- 7899 bytes
- Lines
- 332
- 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/module.hlinux/of.hlinux/media-bus-format.hlinux/gpio/consumer.hlinux/regulator/consumer.hdrm/drm_mipi_dsi.hdrm/drm_modes.hdrm/drm_panel.hvideo/mipi_display.h
Detected Declarations
struct r63353_instrstruct r63353_descstruct r63353_panelfunction Copyrightfunction r63353_panel_power_onfunction r63353_panel_power_offfunction r63353_panel_activatefunction r63353_panel_preparefunction r63353_panel_deactivatefunction r63353_panel_unpreparefunction r63353_panel_get_modesfunction r63353_panel_probefunction r63353_panel_removefunction r63353_panel_shutdown
Annotated Snippet
struct r63353_instr {
size_t len;
const u8 *data;
};
static const struct r63353_instr sharp_ls068b3sx02_init[] = {
R63353_INSTR(0x51, 0xff),
R63353_INSTR(0x53, 0x0c),
R63353_INSTR(0x55, 0x00),
R63353_INSTR(0x84, 0x00),
R63353_INSTR(0x29),
};
struct r63353_desc {
const char *name;
const struct r63353_instr *init;
const size_t init_length;
const struct drm_display_mode *mode;
u32 width_mm;
u32 height_mm;
};
struct r63353_panel {
struct drm_panel base;
struct mipi_dsi_device *dsi;
struct gpio_desc *reset_gpio;
struct regulator *dvdd;
struct regulator *avdd;
struct r63353_desc *pdata;
};
static inline struct r63353_panel *to_r63353_panel(struct drm_panel *panel)
{
return container_of(panel, struct r63353_panel, base);
}
static int r63353_panel_power_on(struct r63353_panel *rpanel)
{
struct mipi_dsi_device *dsi = rpanel->dsi;
struct device *dev = &dsi->dev;
int ret;
ret = regulator_enable(rpanel->avdd);
if (ret) {
dev_err(dev, "Failed to enable avdd regulator (%d)\n", ret);
return ret;
}
usleep_range(15000, 25000);
ret = regulator_enable(rpanel->dvdd);
if (ret) {
dev_err(dev, "Failed to enable dvdd regulator (%d)\n", ret);
regulator_disable(rpanel->avdd);
return ret;
}
usleep_range(300000, 350000);
gpiod_set_value(rpanel->reset_gpio, 1);
usleep_range(15000, 25000);
return 0;
}
static int r63353_panel_power_off(struct r63353_panel *rpanel)
{
gpiod_set_value(rpanel->reset_gpio, 0);
regulator_disable(rpanel->dvdd);
regulator_disable(rpanel->avdd);
return 0;
}
static int r63353_panel_activate(struct r63353_panel *rpanel)
{
struct mipi_dsi_device *dsi = rpanel->dsi;
struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
int i;
mipi_dsi_dcs_soft_reset_multi(&dsi_ctx);
mipi_dsi_usleep_range(&dsi_ctx, 15000, 17000);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
for (i = 0; i < rpanel->pdata->init_length; i++) {
const struct r63353_instr *instr = &rpanel->pdata->init[i];
Annotation
- Immediate include surface: `linux/delay.h`, `linux/device.h`, `linux/err.h`, `linux/errno.h`, `linux/kernel.h`, `linux/module.h`, `linux/of.h`, `linux/media-bus-format.h`.
- Detected declarations: `struct r63353_instr`, `struct r63353_desc`, `struct r63353_panel`, `function Copyright`, `function r63353_panel_power_on`, `function r63353_panel_power_off`, `function r63353_panel_activate`, `function r63353_panel_prepare`, `function r63353_panel_deactivate`, `function r63353_panel_unprepare`.
- 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.