drivers/media/i2c/msp3400-driver.h
Source file repositories/reference/linux-study-clean/drivers/media/i2c/msp3400-driver.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/i2c/msp3400-driver.h- Extension
.h- Size
- 3694 bytes
- Lines
- 150
- 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
media/drv-intf/msp3400.hmedia/v4l2-device.hmedia/v4l2-ctrls.hmedia/v4l2-mc.h
Detected Declarations
struct msp_stateenum msp3400_pads
Annotated Snippet
struct msp_state {
struct v4l2_subdev sd;
struct v4l2_ctrl_handler hdl;
int rev1, rev2;
int ident;
u8 has_nicam;
u8 has_radio;
u8 has_headphones;
u8 has_ntsc_jp_d_k3;
u8 has_scart2;
u8 has_scart3;
u8 has_scart4;
u8 has_scart2_out;
u8 has_scart2_out_volume;
u8 has_i2s_conf;
u8 has_subwoofer;
u8 has_sound_processing;
u8 has_virtual_dolby_surround;
u8 has_dolby_pro_logic;
u8 force_btsc;
int radio;
int opmode;
int std;
int mode;
v4l2_std_id v4l2_std, detected_std;
int nicam_on;
int acb;
int in_scart;
int i2s_mode;
int main, second; /* sound carrier */
int input;
u32 route_in;
u32 route_out;
/* v4l2 */
int audmode;
int rxsubchans;
struct {
/* volume cluster */
struct v4l2_ctrl *volume;
struct v4l2_ctrl *muted;
};
int scan_in_progress;
/* thread */
struct task_struct *kthread;
wait_queue_head_t wq;
unsigned int restart:1;
unsigned int watch_stereo:1;
#if IS_ENABLED(CONFIG_MEDIA_CONTROLLER)
struct media_pad pads[MSP3400_NUM_PADS];
#endif
};
static inline struct msp_state *to_state(struct v4l2_subdev *sd)
{
return container_of(sd, struct msp_state, sd);
}
static inline struct msp_state *ctrl_to_state(struct v4l2_ctrl *ctrl)
{
return container_of(ctrl->handler, struct msp_state, hdl);
}
/* msp3400-driver.c */
int msp_write_dem(struct i2c_client *client, int addr, int val);
int msp_write_dsp(struct i2c_client *client, int addr, int val);
int msp_read_dem(struct i2c_client *client, int addr);
int msp_read_dsp(struct i2c_client *client, int addr);
int msp_reset(struct i2c_client *client);
void msp_set_scart(struct i2c_client *client, int in, int out);
void msp_update_volume(struct msp_state *state);
int msp_sleep(struct msp_state *state, int msec);
/* msp3400-kthreads.c */
const char *msp_standard_std_name(int std);
void msp_set_audmode(struct i2c_client *client);
int msp_detect_stereo(struct i2c_client *client);
int msp3400c_thread(void *data);
int msp3410d_thread(void *data);
int msp34xxg_thread(void *data);
void msp3400c_set_mode(struct i2c_client *client, int mode);
void msp3400c_set_carrier(struct i2c_client *client, int cdo1, int cdo2);
#endif /* MSP3400_DRIVER_H */
Annotation
- Immediate include surface: `media/drv-intf/msp3400.h`, `media/v4l2-device.h`, `media/v4l2-ctrls.h`, `media/v4l2-mc.h`.
- Detected declarations: `struct msp_state`, `enum msp3400_pads`.
- 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.