diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-11-27 09:57:42 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 09:25:57 -0500 |
commit | 588c87be0b44ccf44e321eeae52c674a67a6adc0 (patch) | |
tree | ce266f6a17ad0563e6cb235cc9257a59618e3df0 /drivers/media/platform/s5p-fimc/fimc-mdevice.c | |
parent | a2fea0dfddf95b7f1e7adb3630c7d07a92cfb09b (diff) |
[media] s5p-fimc: Add sensor group ids for fimc-is
Add subdev group id definition for FIMC-IS ISP and sensor subdev.
While at it rename all group id definitions to start with GRP_ID.
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-fimc/fimc-mdevice.c')
-rw-r--r-- | drivers/media/platform/s5p-fimc/fimc-mdevice.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/media/platform/s5p-fimc/fimc-mdevice.c b/drivers/media/platform/s5p-fimc/fimc-mdevice.c index 1bd5678cfeb9..280a4d6321ed 100644 --- a/drivers/media/platform/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/platform/s5p-fimc/fimc-mdevice.c | |||
@@ -62,16 +62,17 @@ static void fimc_pipeline_prepare(struct fimc_pipeline *p, | |||
62 | sd = media_entity_to_v4l2_subdev(pad->entity); | 62 | sd = media_entity_to_v4l2_subdev(pad->entity); |
63 | 63 | ||
64 | switch (sd->grp_id) { | 64 | switch (sd->grp_id) { |
65 | case SENSOR_GROUP_ID: | 65 | case GRP_ID_FIMC_IS_SENSOR: |
66 | case GRP_ID_SENSOR: | ||
66 | p->subdevs[IDX_SENSOR] = sd; | 67 | p->subdevs[IDX_SENSOR] = sd; |
67 | break; | 68 | break; |
68 | case CSIS_GROUP_ID: | 69 | case GRP_ID_CSIS: |
69 | p->subdevs[IDX_CSIS] = sd; | 70 | p->subdevs[IDX_CSIS] = sd; |
70 | break; | 71 | break; |
71 | case FLITE_GROUP_ID: | 72 | case GRP_ID_FLITE: |
72 | p->subdevs[IDX_FLITE] = sd; | 73 | p->subdevs[IDX_FLITE] = sd; |
73 | break; | 74 | break; |
74 | case FIMC_GROUP_ID: | 75 | case GRP_ID_FIMC: |
75 | /* No need to control FIMC subdev through subdev ops */ | 76 | /* No need to control FIMC subdev through subdev ops */ |
76 | break; | 77 | break; |
77 | default: | 78 | default: |
@@ -269,7 +270,7 @@ static struct v4l2_subdev *fimc_md_register_sensor(struct fimc_md *fmd, | |||
269 | return ERR_PTR(-EPROBE_DEFER); | 270 | return ERR_PTR(-EPROBE_DEFER); |
270 | } | 271 | } |
271 | v4l2_set_subdev_hostdata(sd, s_info); | 272 | v4l2_set_subdev_hostdata(sd, s_info); |
272 | sd->grp_id = SENSOR_GROUP_ID; | 273 | sd->grp_id = GRP_ID_SENSOR; |
273 | 274 | ||
274 | v4l2_info(&fmd->v4l2_dev, "Registered sensor subdevice %s\n", | 275 | v4l2_info(&fmd->v4l2_dev, "Registered sensor subdevice %s\n", |
275 | s_info->pdata.board_info->type); | 276 | s_info->pdata.board_info->type); |
@@ -351,7 +352,7 @@ static int fimc_register_callback(struct device *dev, void *p) | |||
351 | return 0; | 352 | return 0; |
352 | 353 | ||
353 | sd = &fimc->vid_cap.subdev; | 354 | sd = &fimc->vid_cap.subdev; |
354 | sd->grp_id = FIMC_GROUP_ID; | 355 | sd->grp_id = GRP_ID_FIMC; |
355 | v4l2_set_subdev_hostdata(sd, (void *)&fimc_pipeline_ops); | 356 | v4l2_set_subdev_hostdata(sd, (void *)&fimc_pipeline_ops); |
356 | 357 | ||
357 | ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd); | 358 | ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd); |
@@ -374,7 +375,7 @@ static int fimc_lite_register_callback(struct device *dev, void *p) | |||
374 | if (fimc == NULL || fimc->index >= FIMC_LITE_MAX_DEVS) | 375 | if (fimc == NULL || fimc->index >= FIMC_LITE_MAX_DEVS) |
375 | return 0; | 376 | return 0; |
376 | 377 | ||
377 | fimc->subdev.grp_id = FLITE_GROUP_ID; | 378 | fimc->subdev.grp_id = GRP_ID_FLITE; |
378 | v4l2_set_subdev_hostdata(&fimc->subdev, (void *)&fimc_pipeline_ops); | 379 | v4l2_set_subdev_hostdata(&fimc->subdev, (void *)&fimc_pipeline_ops); |
379 | 380 | ||
380 | ret = v4l2_device_register_subdev(&fmd->v4l2_dev, &fimc->subdev); | 381 | ret = v4l2_device_register_subdev(&fmd->v4l2_dev, &fimc->subdev); |
@@ -404,7 +405,7 @@ static int csis_register_callback(struct device *dev, void *p) | |||
404 | v4l2_info(sd, "csis%d sd: %s\n", pdev->id, sd->name); | 405 | v4l2_info(sd, "csis%d sd: %s\n", pdev->id, sd->name); |
405 | 406 | ||
406 | id = pdev->id < 0 ? 0 : pdev->id; | 407 | id = pdev->id < 0 ? 0 : pdev->id; |
407 | sd->grp_id = CSIS_GROUP_ID; | 408 | sd->grp_id = GRP_ID_CSIS; |
408 | 409 | ||
409 | ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd); | 410 | ret = v4l2_device_register_subdev(&fmd->v4l2_dev, sd); |
410 | if (!ret) | 411 | if (!ret) |
@@ -828,11 +829,11 @@ static int fimc_md_link_notify(struct media_pad *source, | |||
828 | sd = media_entity_to_v4l2_subdev(sink->entity); | 829 | sd = media_entity_to_v4l2_subdev(sink->entity); |
829 | 830 | ||
830 | switch (sd->grp_id) { | 831 | switch (sd->grp_id) { |
831 | case FLITE_GROUP_ID: | 832 | case GRP_ID_FLITE: |
832 | fimc_lite = v4l2_get_subdevdata(sd); | 833 | fimc_lite = v4l2_get_subdevdata(sd); |
833 | pipeline = &fimc_lite->pipeline; | 834 | pipeline = &fimc_lite->pipeline; |
834 | break; | 835 | break; |
835 | case FIMC_GROUP_ID: | 836 | case GRP_ID_FIMC: |
836 | fimc = v4l2_get_subdevdata(sd); | 837 | fimc = v4l2_get_subdevdata(sd); |
837 | pipeline = &fimc->pipeline; | 838 | pipeline = &fimc->pipeline; |
838 | break; | 839 | break; |