drivers/media/platform/rockchip/rkcif/rkcif-dev.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/rockchip/rkcif/rkcif-dev.c- Extension
.c- Size
- 7815 bytes
- Lines
- 322
- Domain
- Driver Families
- Bucket
- drivers/media
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/delay.hlinux/interrupt.hlinux/mfd/syscon.hlinux/module.hlinux/of.hlinux/of_graph.hlinux/of_platform.hlinux/pm_runtime.hlinux/reset.hmedia/v4l2-fwnode.hmedia/v4l2-mc.hrkcif-capture-dvp.hrkcif-capture-mipi.hrkcif-common.h
Detected Declarations
function rkcif_registerfunction rkcif_unregisterfunction rkcif_notifier_boundfunction rkcif_notifier_completefunction rkcif_isrfunction rkcif_probefunction rkcif_removefunction rkcif_runtime_suspendfunction rkcif_runtime_resume
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* Rockchip Camera Interface (CIF) Driver
*
* Copyright (C) 2018 Rockchip Electronics Co., Ltd.
* Copyright (C) 2020 Maxime Chevallier <maxime.chevallier@bootlin.com>
* Copyright (C) 2023 Mehdi Djait <mehdi.djait@bootlin.com>
* Copyright (C) 2025 Michael Riesch <michael.riesch@wolfvision.net>
* Copyright (C) 2025 Collabora, Ltd.
*/
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_graph.h>
#include <linux/of_platform.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>
#include <media/v4l2-fwnode.h>
#include <media/v4l2-mc.h>
#include "rkcif-capture-dvp.h"
#include "rkcif-capture-mipi.h"
#include "rkcif-common.h"
static const char *const px30_vip_clks[] = {
"aclk",
"hclk",
"pclk",
};
static const struct rkcif_match_data px30_vip_match_data = {
.clks = px30_vip_clks,
.clks_num = ARRAY_SIZE(px30_vip_clks),
.dvp = &rkcif_px30_vip_dvp_match_data,
};
static const char *const rk3568_vicap_clks[] = {
"aclk",
"hclk",
"dclk",
"iclk",
};
static const struct rkcif_match_data rk3568_vicap_match_data = {
.clks = rk3568_vicap_clks,
.clks_num = ARRAY_SIZE(rk3568_vicap_clks),
.dvp = &rkcif_rk3568_vicap_dvp_match_data,
.mipi = &rkcif_rk3568_vicap_mipi_match_data,
};
static const char *const rk3588_vicap_clks[] = {
"aclk",
"hclk",
"dclk",
"iclk",
"iclk1",
};
static const struct rkcif_match_data rk3588_vicap_match_data = {
.clks = rk3588_vicap_clks,
.clks_num = ARRAY_SIZE(rk3588_vicap_clks),
.mipi = &rkcif_rk3588_vicap_mipi_match_data,
};
static const struct of_device_id rkcif_plat_of_match[] = {
{
.compatible = "rockchip,px30-vip",
.data = &px30_vip_match_data,
},
{
.compatible = "rockchip,rk3568-vicap",
.data = &rk3568_vicap_match_data,
},
{
.compatible = "rockchip,rk3588-vicap",
.data = &rk3588_vicap_match_data,
},
{}
};
MODULE_DEVICE_TABLE(of, rkcif_plat_of_match);
static int rkcif_register(struct rkcif_device *rkcif)
{
int ret;
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/mfd/syscon.h`, `linux/module.h`, `linux/of.h`, `linux/of_graph.h`, `linux/of_platform.h`.
- Detected declarations: `function rkcif_register`, `function rkcif_unregister`, `function rkcif_notifier_bound`, `function rkcif_notifier_complete`, `function rkcif_isr`, `function rkcif_probe`, `function rkcif_remove`, `function rkcif_runtime_suspend`, `function rkcif_runtime_resume`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.