diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-19 16:44:51 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-26 06:45:58 -0500 |
commit | 7e4f23d53d0f5b9934302324a2d736d1c07c2d2b (patch) | |
tree | 6bf5c10452a48318a0a3cdbc5d4e38d7b9eb3b24 /drivers/media/i2c | |
parent | db749359059f3049fc5c66950e5ca85f67d7c1b0 (diff) |
[media] cx25840: better document the media pads
Use an enum to better document the media pads.
No functional changes.
Suggested-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r-- | drivers/media/i2c/cx25840/cx25840-core.c | 6 | ||||
-rw-r--r-- | drivers/media/i2c/cx25840/cx25840-core.h | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c index 185cb55253c9..bd496447749a 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.c +++ b/drivers/media/i2c/cx25840/cx25840-core.c | |||
@@ -5196,9 +5196,9 @@ static int cx25840_probe(struct i2c_client *client, | |||
5196 | * However, at least for now, there's no much gain on modelling | 5196 | * However, at least for now, there's no much gain on modelling |
5197 | * those extra inputs. So, let's add it only when needed. | 5197 | * those extra inputs. So, let's add it only when needed. |
5198 | */ | 5198 | */ |
5199 | state->pads[0].flags = MEDIA_PAD_FL_SINK; /* Tuner or input */ | 5199 | state->pads[CX25840_PAD_INPUT].flags = MEDIA_PAD_FL_SINK; |
5200 | state->pads[1].flags = MEDIA_PAD_FL_SOURCE; /* Video */ | 5200 | state->pads[CX25840_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; |
5201 | state->pads[2].flags = MEDIA_PAD_FL_SOURCE; /* VBI */ | 5201 | state->pads[CX25840_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE; |
5202 | sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER; | 5202 | sd->entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER; |
5203 | 5203 | ||
5204 | ret = media_entity_init(&sd->entity, ARRAY_SIZE(state->pads), | 5204 | ret = media_entity_init(&sd->entity, ARRAY_SIZE(state->pads), |
diff --git a/drivers/media/i2c/cx25840/cx25840-core.h b/drivers/media/i2c/cx25840/cx25840-core.h index 17b409f55445..fdea48ce0c03 100644 --- a/drivers/media/i2c/cx25840/cx25840-core.h +++ b/drivers/media/i2c/cx25840/cx25840-core.h | |||
@@ -41,6 +41,14 @@ enum cx25840_model { | |||
41 | CX25837, | 41 | CX25837, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | enum cx25840_media_pads { | ||
45 | CX25840_PAD_INPUT, | ||
46 | CX25840_PAD_VID_OUT, | ||
47 | CX25840_PAD_VBI_OUT, | ||
48 | |||
49 | CX25840_NUM_PADS | ||
50 | }; | ||
51 | |||
44 | struct cx25840_state { | 52 | struct cx25840_state { |
45 | struct i2c_client *c; | 53 | struct i2c_client *c; |
46 | struct v4l2_subdev sd; | 54 | struct v4l2_subdev sd; |
@@ -65,7 +73,7 @@ struct cx25840_state { | |||
65 | struct work_struct fw_work; /* work entry for fw load */ | 73 | struct work_struct fw_work; /* work entry for fw load */ |
66 | struct cx25840_ir_state *ir_state; | 74 | struct cx25840_ir_state *ir_state; |
67 | #if defined(CONFIG_MEDIA_CONTROLLER) | 75 | #if defined(CONFIG_MEDIA_CONTROLLER) |
68 | struct media_pad pads[3]; | 76 | struct media_pad pads[CX25840_NUM_PADS]; |
69 | #endif | 77 | #endif |
70 | }; | 78 | }; |
71 | 79 | ||