media: au8522: declare its own pads
As we don't need anymore to share pad numbers with similar drivers, use its own pad definition instead of a global model. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
5e68d8e26e
commit
44fd653bde
|
@ -718,12 +718,12 @@ static int au8522_probe(struct i2c_client *client,
|
||||||
v4l2_i2c_subdev_init(sd, client, &au8522_ops);
|
v4l2_i2c_subdev_init(sd, client, &au8522_ops);
|
||||||
#if defined(CONFIG_MEDIA_CONTROLLER)
|
#if defined(CONFIG_MEDIA_CONTROLLER)
|
||||||
|
|
||||||
state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
|
state->pads[AU8522_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
|
||||||
state->pads[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
|
state->pads[AU8522_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
|
||||||
state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
state->pads[AU8522_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
||||||
state->pads[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;
|
state->pads[AU8522_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;
|
||||||
state->pads[DEMOD_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
state->pads[AU8522_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
||||||
state->pads[DEMOD_PAD_AUDIO_OUT].sig_type = PAD_SIGNAL_AUDIO;
|
state->pads[AU8522_PAD_AUDIO_OUT].sig_type = PAD_SIGNAL_AUDIO;
|
||||||
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
|
sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
|
||||||
|
|
||||||
ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
|
ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
|
||||||
|
|
|
@ -40,6 +40,13 @@
|
||||||
#define AU8522_DIGITAL_MODE 1
|
#define AU8522_DIGITAL_MODE 1
|
||||||
#define AU8522_SUSPEND_MODE 2
|
#define AU8522_SUSPEND_MODE 2
|
||||||
|
|
||||||
|
enum au8522_pads {
|
||||||
|
AU8522_PAD_IF_INPUT,
|
||||||
|
AU8522_PAD_VID_OUT,
|
||||||
|
AU8522_PAD_AUDIO_OUT,
|
||||||
|
AU8522_NUM_PADS
|
||||||
|
};
|
||||||
|
|
||||||
struct au8522_state {
|
struct au8522_state {
|
||||||
struct i2c_client *c;
|
struct i2c_client *c;
|
||||||
struct i2c_adapter *i2c;
|
struct i2c_adapter *i2c;
|
||||||
|
@ -71,7 +78,7 @@ struct au8522_state {
|
||||||
struct v4l2_ctrl_handler hdl;
|
struct v4l2_ctrl_handler hdl;
|
||||||
|
|
||||||
#ifdef CONFIG_MEDIA_CONTROLLER
|
#ifdef CONFIG_MEDIA_CONTROLLER
|
||||||
struct media_pad pads[DEMOD_NUM_PADS];
|
struct media_pad pads[AU8522_NUM_PADS];
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue