drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c- Extension
.c- Size
- 3297 bytes
- Lines
- 135
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
drm/drm_panel.hlinux/delay.hlinux/export.hlinux/gpio/consumer.hlinux/module.hlinux/of.hlinux/property.hlinux/regulator/consumer.hpanel-ilitek-ili9806e-core.h
Detected Declarations
struct ili9806efunction ili9806e_power_onfunction ili9806e_power_offfunction ili9806e_probefunction of_device_is_compatiblefunction ili9806e_removeexport ili9806e_get_transportexport ili9806e_power_onexport ili9806e_power_offexport ili9806e_probeexport ili9806e_remove
Annotated Snippet
struct ili9806e {
void *transport;
struct drm_panel panel;
unsigned int num_supplies;
struct regulator_bulk_data supplies[2];
struct gpio_desc *reset_gpio;
};
void *ili9806e_get_transport(struct drm_panel *panel)
{
struct ili9806e *ctx = container_of(panel, struct ili9806e, panel);
return ctx->transport;
}
EXPORT_SYMBOL_GPL(ili9806e_get_transport);
int ili9806e_power_on(struct device *dev)
{
struct ili9806e *ctx = dev_get_drvdata(dev);
int ret;
gpiod_set_value(ctx->reset_gpio, 1);
ret = regulator_bulk_enable(ctx->num_supplies, ctx->supplies);
if (ret) {
dev_err(dev, "regulator bulk enable failed: %d\n", ret);
return ret;
}
usleep_range(10000, 20000);
gpiod_set_value(ctx->reset_gpio, 0);
usleep_range(10000, 20000);
return 0;
}
EXPORT_SYMBOL_GPL(ili9806e_power_on);
int ili9806e_power_off(struct device *dev)
{
struct ili9806e *ctx = dev_get_drvdata(dev);
int ret;
gpiod_set_value(ctx->reset_gpio, 1);
ret = regulator_bulk_disable(ctx->num_supplies, ctx->supplies);
if (ret)
dev_err(dev, "regulator bulk disable failed: %d\n", ret);
return ret;
}
EXPORT_SYMBOL_GPL(ili9806e_power_off);
int ili9806e_probe(struct device *dev, void *transport,
const struct drm_panel_funcs *funcs,
int connector_type)
{
struct ili9806e *ctx;
bool set_prepare_prev_first = false;
int ret;
ctx = devm_drm_panel_alloc(dev, __typeof(*ctx), panel,
funcs, connector_type);
if (IS_ERR(ctx))
return PTR_ERR(ctx);
dev_set_drvdata(dev, ctx);
ctx->transport = transport;
ctx->supplies[ctx->num_supplies++].supply = "vdd";
if (of_device_is_compatible(dev->of_node,
"densitron,dmt028vghmcmi-1d") ||
of_device_is_compatible(dev->of_node,
"ortustech,com35h3p70ulc")) {
ctx->supplies[ctx->num_supplies++].supply = "vccio";
set_prepare_prev_first = true;
}
ret = devm_regulator_bulk_get(dev, ctx->num_supplies, ctx->supplies);
if (ret)
return dev_err_probe(dev, ret, "failed to get regulators\n");
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
if (IS_ERR(ctx->reset_gpio))
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset-gpios\n");
ret = drm_panel_of_backlight(&ctx->panel);
if (ret)
Annotation
- Immediate include surface: `drm/drm_panel.h`, `linux/delay.h`, `linux/export.h`, `linux/gpio/consumer.h`, `linux/module.h`, `linux/of.h`, `linux/property.h`, `linux/regulator/consumer.h`.
- Detected declarations: `struct ili9806e`, `function ili9806e_power_on`, `function ili9806e_power_off`, `function ili9806e_probe`, `function of_device_is_compatible`, `function ili9806e_remove`, `export ili9806e_get_transport`, `export ili9806e_power_on`, `export ili9806e_power_off`, `export ili9806e_probe`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: integration 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.