drivers/media/platform/qcom/camss/camss-tpg.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/camss/camss-tpg.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/camss/camss-tpg.h- Extension
.h- Size
- 2896 bytes
- Lines
- 119
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/clk.hlinux/bitfield.hmedia/media-entity.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-mediabus.hmedia/v4l2-subdev.h
Detected Declarations
struct tpg_testgen_configstruct tpg_format_infostruct tpg_formatsstruct tpg_devicestruct tpg_hw_opsstruct tpg_subdev_resourcesstruct tpg_devicestruct camss_subdev_resourcesenum tpg_testgen_mode
Annotated Snippet
struct tpg_testgen_config {
enum tpg_testgen_mode mode;
const char * const*modes;
u8 nmodes;
};
struct tpg_format_info {
u32 code;
u8 data_type;
u8 encode_format;
u8 bpp;
};
struct tpg_formats {
unsigned int nformats;
const struct tpg_format_info *formats;
};
struct tpg_device;
struct tpg_hw_ops {
int (*configure_stream)(struct tpg_device *tpg, u8 enable);
int (*configure_testgen_pattern)(struct tpg_device *tpg, s32 val);
u32 (*hw_version)(struct tpg_device *tpg);
int (*reset)(struct tpg_device *tpg);
void (*subdev_init)(struct tpg_device *tpg);
};
struct tpg_subdev_resources {
u8 lane_cnt;
const struct tpg_formats *formats;
const struct tpg_hw_ops *hw_ops;
};
struct tpg_device {
struct camss *camss;
u8 id;
struct v4l2_subdev subdev;
struct media_pad pad;
void __iomem *base;
struct camss_clock *clock;
int nclocks;
struct tpg_testgen_config testgen;
struct v4l2_mbus_framefmt fmt;
struct v4l2_ctrl_handler ctrls;
struct v4l2_ctrl *testgen_mode;
const struct tpg_subdev_resources *res;
u32 hw_version;
};
struct camss_subdev_resources;
const struct tpg_format_info *tpg_get_fmt_entry(const struct tpg_format_info *formats,
unsigned int nformats,
u32 code);
int msm_tpg_subdev_init(struct camss *camss,
struct tpg_device *tpg,
const struct camss_subdev_resources *res, u8 id);
int msm_tpg_register_entity(struct tpg_device *tpg,
struct v4l2_device *v4l2_dev);
void msm_tpg_unregister_entity(struct tpg_device *tpg);
extern const struct tpg_formats tpg_formats_gen1;
extern const struct tpg_hw_ops tpg_ops_gen1;
#endif /* QC_MSM_CAMSS_TPG_H */
Annotation
- Immediate include surface: `linux/clk.h`, `linux/bitfield.h`, `media/media-entity.h`, `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-mediabus.h`, `media/v4l2-subdev.h`.
- Detected declarations: `struct tpg_testgen_config`, `struct tpg_format_info`, `struct tpg_formats`, `struct tpg_device`, `struct tpg_hw_ops`, `struct tpg_subdev_resources`, `struct tpg_device`, `struct camss_subdev_resources`, `enum tpg_testgen_mode`.
- 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.