drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/renesas/rzg2l-cru/rzg2l-csi2.c- Extension
.c- Size
- 27291 bytes
- Lines
- 1061
- 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.
- 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/io.hlinux/module.hlinux/of.hlinux/of_graph.hlinux/platform_device.hlinux/pm_runtime.hlinux/reset.hlinux/sys_soc.hlinux/units.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fwnode.hmedia/v4l2-mc.hmedia/v4l2-subdev.h
Detected Declarations
struct rzg2l_csi2struct rzg2l_csi2_infostruct rzg2l_csi2_timingsstruct rzv2h_csi2_s_hssettlectlstruct rzg2l_csi2_formatenum rzg2l_csi2_padsfunction rzg2l_csi2_readfunction rzg2l_csi2_writefunction rzg2l_csi2_setfunction rzg2l_csi2_clrfunction rzg2l_csi2_calc_mbpsfunction rzg2l_csi2_dphy_disablefunction rzg2l_csi2_dphy_enablefunction rzg2l_csi2_dphy_settingfunction rzg2l_csi2_mipi_link_enablefunction rzg2l_csi2_mipi_link_disablefunction rzv2h_csi2_dphy_disablefunction rzv2h_csi2_dphy_enablefunction rzg2l_csi2_mipi_link_settingfunction rzg2l_csi2_s_streamfunction rzg2l_csi2_pre_streamonfunction rzg2l_csi2_post_streamofffunction rzg2l_csi2_set_formatfunction rzg2l_csi2_init_statefunction rzg2l_csi2_enum_mbus_codefunction rzg2l_csi2_enum_frame_sizefunction rzg2l_csi2_get_frame_descfunction rzg2l_csi2_notify_boundfunction rzg2l_csi2_notify_unbindfunction rzg2l_csi2_parse_v4l2function rzg2l_csi2_parse_dtfunction rzg2l_validate_csi2_lanesfunction rzg2l_csi2_probefunction rzg2l_csi2_removefunction rzg2l_csi2_pm_runtime_suspendfunction rzg2l_csi2_pm_runtime_resume
Annotated Snippet
struct rzg2l_csi2 {
struct device *dev;
void __iomem *base;
struct reset_control *presetn;
struct reset_control *cmn_rstb;
const struct rzg2l_csi2_info *info;
struct clk *sysclk;
struct clk *vclk;
unsigned long vclk_rate;
struct v4l2_subdev subdev;
struct media_pad pads[NR_OF_RZG2L_CSI2_PAD];
struct v4l2_async_notifier notifier;
struct v4l2_subdev *remote_source;
unsigned short lanes;
unsigned long hsfreq;
bool dphy_enabled;
};
struct rzg2l_csi2_info {
int (*dphy_enable)(struct rzg2l_csi2 *csi2);
int (*dphy_disable)(struct rzg2l_csi2 *csi2);
bool has_system_clk;
unsigned int min_width;
unsigned int min_height;
unsigned int max_width;
unsigned int max_height;
};
struct rzg2l_csi2_timings {
u32 t_init;
u32 tclk_miss;
u32 tclk_settle;
u32 ths_settle;
u32 tclk_prepare;
u32 ths_prepare;
u32 max_hsfreq;
};
struct rzv2h_csi2_s_hssettlectl {
unsigned int hsfreq;
u16 s_hssettlectl;
};
static const struct rzv2h_csi2_s_hssettlectl rzv2h_s_hssettlectl[] = {
{ 90, 1 }, { 130, 2 }, { 180, 3 },
{ 220, 4 }, { 270, 5 }, { 310, 6 },
{ 360, 7 }, { 400, 8 }, { 450, 9 },
{ 490, 10 }, { 540, 11 }, { 580, 12 },
{ 630, 13 }, { 670, 14 }, { 720, 15 },
{ 760, 16 }, { 810, 17 }, { 850, 18 },
{ 900, 19 }, { 940, 20 }, { 990, 21 },
{ 1030, 22 }, { 1080, 23 }, { 1120, 24 },
{ 1170, 25 }, { 1220, 26 }, { 1260, 27 },
{ 1310, 28 }, { 1350, 29 }, { 1400, 30 },
{ 1440, 31 }, { 1490, 32 }, { 1530, 33 },
{ 1580, 34 }, { 1620, 35 }, { 1670, 36 },
{ 1710, 37 }, { 1760, 38 }, { 1800, 39 },
{ 1850, 40 }, { 1890, 41 }, { 1940, 42 },
{ 1980, 43 }, { 2030, 44 }, { 2070, 45 },
{ 2100, 46 },
};
static const struct rzg2l_csi2_timings rzg2l_csi2_global_timings[] = {
{
.max_hsfreq = 80,
.t_init = 79801,
.tclk_miss = 4,
.tclk_settle = 23,
.ths_settle = 31,
.tclk_prepare = 10,
.ths_prepare = 19,
},
{
.max_hsfreq = 125,
.t_init = 79801,
.tclk_miss = 4,
.tclk_settle = 23,
.ths_settle = 28,
.tclk_prepare = 10,
.ths_prepare = 19,
},
{
.max_hsfreq = 250,
.t_init = 79801,
.tclk_miss = 4,
.tclk_settle = 23,
Annotation
- Immediate include surface: `linux/clk.h`, `linux/delay.h`, `linux/interrupt.h`, `linux/io.h`, `linux/module.h`, `linux/of.h`, `linux/of_graph.h`, `linux/platform_device.h`.
- Detected declarations: `struct rzg2l_csi2`, `struct rzg2l_csi2_info`, `struct rzg2l_csi2_timings`, `struct rzv2h_csi2_s_hssettlectl`, `struct rzg2l_csi2_format`, `enum rzg2l_csi2_pads`, `function rzg2l_csi2_read`, `function rzg2l_csi2_write`, `function rzg2l_csi2_set`, `function rzg2l_csi2_clr`.
- Atlas domain: Driver Families / drivers/media.
- 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.