--- zzzz-none-000/linux-3.10.107/drivers/media/i2c/cx25840/cx25840-core.h 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/media/i2c/cx25840/cx25840-core.h 2021-02-04 17:41:59.000000000 +0000 @@ -23,12 +23,32 @@ #include #include -#include #include #include struct cx25840_ir_state; +enum cx25840_model { + CX23885_AV, + CX23887_AV, + CX23888_AV, + CX2310X_AV, + CX25840, + CX25841, + CX25842, + CX25843, + CX25836, + CX25837, +}; + +enum cx25840_media_pads { + CX25840_PAD_INPUT, + CX25840_PAD_VID_OUT, + CX25840_PAD_VBI_OUT, + + CX25840_NUM_PADS +}; + struct cx25840_state { struct i2c_client *c; struct v4l2_subdev sd; @@ -46,12 +66,15 @@ u32 audclk_freq; int audmode; int vbi_line_offset; - u32 id; + enum cx25840_model id; u32 rev; int is_initialized; wait_queue_head_t fw_wait; /* wake up when the fw load is finished */ struct work_struct fw_work; /* work entry for fw load */ 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) @@ -66,35 +89,35 @@ static inline bool is_cx2583x(struct cx25840_state *state) { - return state->id == V4L2_IDENT_CX25836 || - state->id == V4L2_IDENT_CX25837; + return state->id == CX25836 || + state->id == CX25837; } static inline bool is_cx231xx(struct cx25840_state *state) { - return state->id == V4L2_IDENT_CX2310X_AV; + return state->id == CX2310X_AV; } static inline bool is_cx2388x(struct cx25840_state *state) { - return state->id == V4L2_IDENT_CX23885_AV || - state->id == V4L2_IDENT_CX23887_AV || - state->id == V4L2_IDENT_CX23888_AV; + 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 == V4L2_IDENT_CX23885_AV; + return state->id == CX23885_AV; } static inline bool is_cx23887(struct cx25840_state *state) { - return state->id == V4L2_IDENT_CX23887_AV; + return state->id == CX23887_AV; } static inline bool is_cx23888(struct cx25840_state *state) { - return state->id == V4L2_IDENT_CX23888_AV; + return state->id == CX23888_AV; } /* ----------------------------------------------------------------------- */