Commit 7e4f23d5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] cx25840: better document the media pads

Use an enum to better document the media pads.

No functional changes.
Suggested-by: default avatarPrabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent db749359
...@@ -5196,9 +5196,9 @@ static int cx25840_probe(struct i2c_client *client, ...@@ -5196,9 +5196,9 @@ static int cx25840_probe(struct i2c_client *client,
* However, at least for now, there's no much gain on modelling * However, at least for now, there's no much gain on modelling
* those extra inputs. So, let's add it only when needed. * those extra inputs. So, let's add it only when needed.
*/ */
state->pads[0].flags = MEDIA_PAD_FL_SINK; /* Tuner or input */ state->pads[CX25840_PAD_INPUT].flags = MEDIA_PAD_FL_SINK;
state->pads[1].flags = MEDIA_PAD_FL_SOURCE; /* Video */ state->pads[CX25840_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
state->pads[2].flags = MEDIA_PAD_FL_SOURCE; /* VBI */ state->pads[CX25840_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE;
sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER; sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
ret = media_entity_init(&sd->entity, ARRAY_SIZE(state->pads), ret = media_entity_init(&sd->entity, ARRAY_SIZE(state->pads),
......
...@@ -41,6 +41,14 @@ enum cx25840_model { ...@@ -41,6 +41,14 @@ enum cx25840_model {
CX25837, CX25837,
}; };
enum cx25840_media_pads {
CX25840_PAD_INPUT,
CX25840_PAD_VID_OUT,
CX25840_PAD_VBI_OUT,
CX25840_NUM_PADS
};
struct cx25840_state { struct cx25840_state {
struct i2c_client *c; struct i2c_client *c;
struct v4l2_subdev sd; struct v4l2_subdev sd;
...@@ -65,7 +73,7 @@ struct cx25840_state { ...@@ -65,7 +73,7 @@ struct cx25840_state {
struct work_struct fw_work; /* work entry for fw load */ struct work_struct fw_work; /* work entry for fw load */
struct cx25840_ir_state *ir_state; struct cx25840_ir_state *ir_state;
#if defined(CONFIG_MEDIA_CONTROLLER) #if defined(CONFIG_MEDIA_CONTROLLER)
struct media_pad pads[3]; struct media_pad pads[CX25840_NUM_PADS];
#endif #endif
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment