drivers/media/platform/qcom/camss/camss-csiphy.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/camss/camss-csiphy.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/camss/camss-csiphy.h- Extension
.h- Size
- 3321 bytes
- Lines
- 138
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/interrupt.hmedia/media-entity.hmedia/v4l2-device.hmedia/v4l2-mediabus.hmedia/v4l2-subdev.h
Detected Declarations
struct csiphy_lanestruct csiphy_lanes_cfgstruct csiphy_csi2_cfgstruct csiphy_configstruct csiphy_format_infostruct csiphy_formatsstruct csiphy_devicestruct csiphy_hw_opsstruct csiphy_subdev_resourcesstruct csiphy_device_regsstruct csiphy_devicestruct camss_subdev_resources
Annotated Snippet
struct csiphy_lane {
u8 pos;
u8 pol;
};
/**
* struct csiphy_lanes_cfg - CSIPHY lanes configuration
* @num_data: number of data lanes
* @data: data lanes configuration
* @clk: clock lane configuration (only for D-PHY)
*/
struct csiphy_lanes_cfg {
int num_data;
struct csiphy_lane *data;
struct csiphy_lane clk;
};
struct csiphy_csi2_cfg {
struct csiphy_lanes_cfg lane_cfg;
};
struct csiphy_config {
u8 combo_mode;
u8 csid_id;
struct csiphy_csi2_cfg *csi2;
};
struct csiphy_format_info {
u32 code;
u8 bpp;
};
struct csiphy_formats {
unsigned int nformats;
const struct csiphy_format_info *formats;
};
struct csiphy_device;
struct csiphy_hw_ops {
/*
* csiphy_get_lane_mask - Calculate CSI2 lane mask configuration parameter
* @lane_cfg - CSI2 lane configuration
*
* Return lane mask
*/
u8 (*get_lane_mask)(struct csiphy_lanes_cfg *lane_cfg);
void (*hw_version_read)(struct csiphy_device *csiphy,
struct device *dev);
void (*reset)(struct csiphy_device *csiphy);
void (*lanes_enable)(struct csiphy_device *csiphy,
struct csiphy_config *cfg,
s64 link_freq, u8 lane_mask);
void (*lanes_disable)(struct csiphy_device *csiphy,
struct csiphy_config *cfg);
irqreturn_t (*isr)(int irq, void *dev);
int (*init)(struct csiphy_device *csiphy);
};
struct csiphy_subdev_resources {
u8 id;
const struct csiphy_hw_ops *hw_ops;
const struct csiphy_formats *formats;
};
struct csiphy_device_regs {
const struct csiphy_lane_regs *lane_regs;
int lane_array_size;
u32 offset;
u32 common_status_offset;
};
struct csiphy_device {
struct camss *camss;
u8 id;
struct v4l2_subdev subdev;
struct media_pad pads[MSM_CSIPHY_PADS_NUM];
void __iomem *base;
void __iomem *base_clk_mux;
u32 irq;
char irq_name[30];
struct camss_clock *clock;
bool *rate_set;
int nclocks;
u32 timer_clk_rate;
struct regulator_bulk_data *supplies;
int num_supplies;
struct csiphy_config cfg;
struct v4l2_mbus_framefmt fmt[MSM_CSIPHY_PADS_NUM];
const struct csiphy_subdev_resources *res;
Annotation
- Immediate include surface: `linux/clk.h`, `linux/interrupt.h`, `media/media-entity.h`, `media/v4l2-device.h`, `media/v4l2-mediabus.h`, `media/v4l2-subdev.h`.
- Detected declarations: `struct csiphy_lane`, `struct csiphy_lanes_cfg`, `struct csiphy_csi2_cfg`, `struct csiphy_config`, `struct csiphy_format_info`, `struct csiphy_formats`, `struct csiphy_device`, `struct csiphy_hw_ops`, `struct csiphy_subdev_resources`, `struct csiphy_device_regs`.
- 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.