drivers/gpu/drm/verisilicon/vs_dc.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/verisilicon/vs_dc.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/verisilicon/vs_dc.c
Extension
.c
Size
4719 bytes
Lines
208
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.

Dependency Surface

Detected Declarations

Annotated Snippet

if (IS_ERR(dc->pix_clk[i])) {
			dev_err(dev, "can't get pixel clk %u\n", i);
			ret = PTR_ERR(dc->pix_clk[i]);
			goto err_rst_assert;
		}
	}

	ret = devm_request_irq(dev, irq, vs_dc_irq_handler, 0,
			       dev_name(dev), dc);
	if (ret) {
		dev_err(dev, "can't request irq\n");
		goto err_rst_assert;
	}

	dev_set_drvdata(dev, dc);

	ret = vs_drm_initialize(dc, pdev);
	if (ret)
		goto err_rst_assert;

	return 0;

err_rst_assert:
	reset_control_bulk_assert(VSDC_RESET_COUNT, dc->rsts);
	return ret;
}

static void vs_dc_remove(struct platform_device *pdev)
{
	struct vs_dc *dc = dev_get_drvdata(&pdev->dev);

	vs_drm_finalize(dc);

	dev_set_drvdata(&pdev->dev, NULL);

	reset_control_bulk_assert(VSDC_RESET_COUNT, dc->rsts);
}

static void vs_dc_shutdown(struct platform_device *pdev)
{
	struct vs_dc *dc = dev_get_drvdata(&pdev->dev);

	vs_drm_shutdown_handler(dc);
}

static struct platform_driver vs_dc_platform_driver = {
	.probe = vs_dc_probe,
	.remove = vs_dc_remove,
	.shutdown = vs_dc_shutdown,
	.driver = {
		.name = "verisilicon-dc",
		.of_match_table = vs_dc_driver_dt_match,
	},
};

module_platform_driver(vs_dc_platform_driver);

MODULE_AUTHOR("Icenowy Zheng <uwu@icenowy.me>");
MODULE_DESCRIPTION("Verisilicon display controller driver");
MODULE_LICENSE("GPL");

Annotation

Implementation Notes