[media] em28xx: add media controller support

Add the needed bits to make em28xx to create a media
controller graph.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Mauro Carvalho Chehab
2016-01-27 07:07:24 -02:00
szülő ac88fce987
commit 37ecc7b127
5 fájl változott, egészen pontosan 366 új sor hozzáadva és 10 régi sor törölve

Fájl megtekintése

@@ -26,7 +26,7 @@
#ifndef _EM28XX_H
#define _EM28XX_H
#define EM28XX_VERSION "0.2.1"
#define EM28XX_VERSION "0.2.2"
#define DRIVER_DESC "Empia em28xx device driver"
#include <linux/workqueue.h>
@@ -552,6 +552,11 @@ struct em28xx_v4l2 {
bool top_field;
int vbi_read;
unsigned int field_count;
#ifdef CONFIG_MEDIA_CONTROLLER
struct media_pad video_pad, vbi_pad;
struct media_entity *decoder;
#endif
};
struct em28xx_audio {
@@ -712,6 +717,12 @@ struct em28xx {
/* Snapshot button input device */
char snapshot_button_path[30]; /* path of the input dev */
struct input_dev *sbutton_input_dev;
#ifdef CONFIG_MEDIA_CONTROLLER
struct media_device *media_dev;
struct media_entity input_ent[MAX_EM28XX_INPUT];
struct media_pad input_pad[MAX_EM28XX_INPUT];
#endif
};
#define kref_to_dev(d) container_of(d, struct em28xx, ref)