drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-orisetech-ota5601a.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-orisetech-ota5601a.c- Extension
.c- Size
- 8637 bytes
- Lines
- 361
- 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/bits.hlinux/delay.hlinux/device.hlinux/gpio/consumer.hlinux/media-bus-format.hlinux/module.hlinux/of.hlinux/regmap.hlinux/regulator/consumer.hlinux/spi/spi.hdrm/drm_modes.hdrm/drm_panel.h
Detected Declarations
struct ota5601a_panel_infostruct ota5601afunction ota5601a_preparefunction ota5601a_unpreparefunction ota5601a_enablefunction ota5601a_disablefunction ota5601a_get_modesfunction ota5601a_probefunction ota5601a_remove
Annotated Snippet
struct ota5601a_panel_info {
const struct drm_display_mode *display_modes;
unsigned int num_modes;
u16 width_mm, height_mm;
u32 bus_format, bus_flags;
};
struct ota5601a {
struct drm_panel drm_panel;
struct regmap *map;
struct regulator *supply;
const struct ota5601a_panel_info *panel_info;
struct gpio_desc *reset_gpio;
};
static inline struct ota5601a *to_ota5601a(struct drm_panel *panel)
{
return container_of(panel, struct ota5601a, drm_panel);
}
static const struct reg_sequence ota5601a_panel_regs[] = {
{ 0xfd, 0x00 }, /* Page Shift */
{ 0x02, 0x00 }, /* Reset */
{ 0x18, 0x00 }, /* Interface Sel: RGB 24 Bits */
{ 0x34, 0x20 }, /* Undocumented */
{ 0x0c, 0x01 }, /* Contrast set by CMD1 == within page 0x00 */
{ 0x0d, 0x48 }, /* R Brightness */
{ 0x0e, 0x48 }, /* G Brightness */
{ 0x0f, 0x48 }, /* B Brightness */
{ 0x07, 0x40 }, /* R Contrast */
{ 0x08, 0x33 }, /* G Contrast */
{ 0x09, 0x3a }, /* B Contrast */
{ 0x16, 0x01 }, /* NTSC Sel */
{ 0x19, 0x8d }, /* VBLK */
{ 0x1a, 0x28 }, /* HBLK */
{ 0x1c, 0x00 }, /* Scan Shift Dir. */
{ 0xfd, 0xc5 }, /* Page Shift */
{ 0x82, 0x0c }, /* PWR_CTRL Pump */
{ 0xa2, 0xb4 }, /* PWR_CTRL VGH/VGL */
{ 0xfd, 0xc4 }, /* Page Shift - What follows is listed as "RGB 24bit Timing Set" */
{ 0x82, 0x45 },
{ 0xfd, 0xc1 },
{ 0x91, 0x02 },
{ 0xfd, 0xc0 },
{ 0xa1, 0x01 },
{ 0xa2, 0x1f },
{ 0xa3, 0x0b },
{ 0xa4, 0x38 },
{ 0xa5, 0x00 },
{ 0xa6, 0x0a },
{ 0xa7, 0x38 },
{ 0xa8, 0x00 },
{ 0xa9, 0x0a },
{ 0xaa, 0x37 },
{ 0xfd, 0xce },
{ 0x81, 0x18 },
{ 0x82, 0x43 },
{ 0x83, 0x43 },
{ 0x91, 0x06 },
{ 0x93, 0x38 },
{ 0x94, 0x02 },
{ 0x95, 0x06 },
{ 0x97, 0x38 },
{ 0x98, 0x02 },
{ 0x99, 0x06 },
{ 0x9b, 0x38 },
{ 0x9c, 0x02 },
{ 0xfd, 0x00 }, /* Page Shift */
};
static const struct regmap_config ota5601a_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
};
static int ota5601a_prepare(struct drm_panel *drm_panel)
{
struct ota5601a *panel = to_ota5601a(drm_panel);
int err;
Annotation
- Immediate include surface: `linux/bits.h`, `linux/delay.h`, `linux/device.h`, `linux/gpio/consumer.h`, `linux/media-bus-format.h`, `linux/module.h`, `linux/of.h`, `linux/regmap.h`.
- Detected declarations: `struct ota5601a_panel_info`, `struct ota5601a`, `function ota5601a_prepare`, `function ota5601a_unprepare`, `function ota5601a_enable`, `function ota5601a_disable`, `function ota5601a_get_modes`, `function ota5601a_probe`, `function ota5601a_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.