drivers/media/i2c/cx25840/cx25840-core.h
Source file repositories/reference/linux-study-clean/drivers/media/i2c/cx25840/cx25840-core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/cx25840/cx25840-core.h- Extension
.h- Size
- 6037 bytes
- Lines
- 195
- 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/videodev2.hmedia/v4l2-device.hmedia/v4l2-ctrls.hlinux/i2c.h
Detected Declarations
struct cx25840_ir_statestruct cx25840_stateenum cx25840_modelenum cx25840_media_padsfunction is_cx2583xfunction is_cx2584xfunction is_cx231xxfunction is_cx2388xfunction is_cx23885function is_cx23887function is_cx23888
Annotated Snippet
struct cx25840_state {
struct i2c_client *c;
struct v4l2_subdev sd;
struct v4l2_ctrl_handler hdl;
struct {
/* volume cluster */
struct v4l2_ctrl *volume;
struct v4l2_ctrl *mute;
};
int pvr150_workaround;
bool generic_mode;
int radio;
v4l2_std_id std;
enum cx25840_video_input vid_input;
u32 vid_config;
enum cx25840_audio_input aud_input;
u32 audclk_freq;
int audmode;
int vbi_line_offset;
enum cx25840_model id;
u32 rev;
int is_initialized;
unsigned int vbi_regs_offset;
wait_queue_head_t fw_wait;
struct work_struct fw_work;
struct cx25840_ir_state *ir_state;
#if defined(CONFIG_MEDIA_CONTROLLER)
struct media_pad pads[CX25840_NUM_PADS];
#endif
};
static inline struct cx25840_state *to_state(struct v4l2_subdev *sd)
{
return container_of(sd, struct cx25840_state, sd);
}
static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl)
{
return &container_of(ctrl->handler, struct cx25840_state, hdl)->sd;
}
static inline bool is_cx2583x(struct cx25840_state *state)
{
return state->id == CX25836 ||
state->id == CX25837;
}
static inline bool is_cx2584x(struct cx25840_state *state)
{
return state->id == CX25840 ||
state->id == CX25841 ||
state->id == CX25842 ||
state->id == CX25843;
}
static inline bool is_cx231xx(struct cx25840_state *state)
{
return state->id == CX2310X_AV;
}
static inline bool is_cx2388x(struct cx25840_state *state)
{
return state->id == CX23885_AV ||
state->id == CX23887_AV ||
state->id == CX23888_AV;
}
static inline bool is_cx23885(struct cx25840_state *state)
{
return state->id == CX23885_AV;
}
static inline bool is_cx23887(struct cx25840_state *state)
{
return state->id == CX23887_AV;
}
static inline bool is_cx23888(struct cx25840_state *state)
{
return state->id == CX23888_AV;
}
/* ----------------------------------------------------------------------- */
/* cx25850-core.c */
int cx25840_write(struct i2c_client *client, u16 addr, u8 value);
int cx25840_write4(struct i2c_client *client, u16 addr, u32 value);
u8 cx25840_read(struct i2c_client *client, u16 addr);
u32 cx25840_read4(struct i2c_client *client, u16 addr);
int cx25840_and_or(struct i2c_client *client, u16 addr, unsigned int mask,
u8 value);
Annotation
- Immediate include surface: `linux/videodev2.h`, `media/v4l2-device.h`, `media/v4l2-ctrls.h`, `linux/i2c.h`.
- Detected declarations: `struct cx25840_ir_state`, `struct cx25840_state`, `enum cx25840_model`, `enum cx25840_media_pads`, `function is_cx2583x`, `function is_cx2584x`, `function is_cx231xx`, `function is_cx2388x`, `function is_cx23885`, `function is_cx23887`.
- 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.