diff options
author | Lad, Prabhakar <prabhakar.lad@ti.com> | 2012-11-20 05:30:36 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-21 11:18:50 -0500 |
commit | caff80c35f923806b7e5ef312dce41663b5e99b9 (patch) | |
tree | a7dc2f10963df469808b7a52fd90276701d644f5 /include/media | |
parent | 5a89fac7e90dd75b9783914fa351069d20fd8c54 (diff) |
[media] davinci: vpbe: pass different platform names to handle different ip's
The vpbe driver can handle different platforms DM644X, DM36X and
DM355. To differentiate between this platforms venc_type/vpbe_type
was passed as part of platform data which was incorrect. The correct
way to differentiate to handle this case is by passing different
platform names.
This patch creates platform_device_id[] array supporting different
platforms and assigns id_table to the platform driver, and finally
in the probe gets the actual device by using platform_get_device_id()
and gets the appropriate driver data for that platform.
Taking this approach will also make the DT transition easier.
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Acked-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/davinci/vpbe_osd.h | 5 | ||||
-rw-r--r-- | include/media/davinci/vpbe_venc.h | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/include/media/davinci/vpbe_osd.h b/include/media/davinci/vpbe_osd.h index 5ab0d8d41f68..42628fcfe1bd 100644 --- a/include/media/davinci/vpbe_osd.h +++ b/include/media/davinci/vpbe_osd.h | |||
@@ -26,7 +26,9 @@ | |||
26 | 26 | ||
27 | #include <media/davinci/vpbe_types.h> | 27 | #include <media/davinci/vpbe_types.h> |
28 | 28 | ||
29 | #define VPBE_OSD_SUBDEV_NAME "vpbe-osd" | 29 | #define DM644X_VPBE_OSD_SUBDEV_NAME "dm644x,vpbe-osd" |
30 | #define DM365_VPBE_OSD_SUBDEV_NAME "dm365,vpbe-osd" | ||
31 | #define DM355_VPBE_OSD_SUBDEV_NAME "dm355,vpbe-osd" | ||
30 | 32 | ||
31 | /** | 33 | /** |
32 | * enum osd_layer | 34 | * enum osd_layer |
@@ -387,7 +389,6 @@ struct osd_state { | |||
387 | }; | 389 | }; |
388 | 390 | ||
389 | struct osd_platform_data { | 391 | struct osd_platform_data { |
390 | enum vpbe_version vpbe_type; | ||
391 | int field_inv_wa_enable; | 392 | int field_inv_wa_enable; |
392 | }; | 393 | }; |
393 | 394 | ||
diff --git a/include/media/davinci/vpbe_venc.h b/include/media/davinci/vpbe_venc.h index cc78c2eb16da..476fafc2f522 100644 --- a/include/media/davinci/vpbe_venc.h +++ b/include/media/davinci/vpbe_venc.h | |||
@@ -20,7 +20,9 @@ | |||
20 | #include <media/v4l2-subdev.h> | 20 | #include <media/v4l2-subdev.h> |
21 | #include <media/davinci/vpbe_types.h> | 21 | #include <media/davinci/vpbe_types.h> |
22 | 22 | ||
23 | #define VPBE_VENC_SUBDEV_NAME "vpbe-venc" | 23 | #define DM644X_VPBE_VENC_SUBDEV_NAME "dm644x,vpbe-venc" |
24 | #define DM365_VPBE_VENC_SUBDEV_NAME "dm365,vpbe-venc" | ||
25 | #define DM355_VPBE_VENC_SUBDEV_NAME "dm355,vpbe-venc" | ||
24 | 26 | ||
25 | /* venc events */ | 27 | /* venc events */ |
26 | #define VENC_END_OF_FRAME BIT(0) | 28 | #define VENC_END_OF_FRAME BIT(0) |
@@ -28,7 +30,6 @@ | |||
28 | #define VENC_SECOND_FIELD BIT(2) | 30 | #define VENC_SECOND_FIELD BIT(2) |
29 | 31 | ||
30 | struct venc_platform_data { | 32 | struct venc_platform_data { |
31 | enum vpbe_version venc_type; | ||
32 | int (*setup_pinmux)(enum v4l2_mbus_pixelcode if_type, | 33 | int (*setup_pinmux)(enum v4l2_mbus_pixelcode if_type, |
33 | int field); | 34 | int field); |
34 | int (*setup_clock)(enum vpbe_enc_timings_type type, | 35 | int (*setup_clock)(enum vpbe_enc_timings_type type, |