All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	Hans Verkuil <hans.verkuil@cisco.com>,
	Devin Heitmueller <dheitmueller@kernellabs.com>,
	"Gustavo A. R. Silva" <gustavo@embeddedor.com>
Subject: [PATCH 06/13] media: au8522: declare its own pads
Date: Wed,  1 Aug 2018 12:55:08 -0300	[thread overview]
Message-ID: <727ba77c1e3fe51af8fadd6029291886f42176c1.1533138685.git.mchehab+samsung@kernel.org> (raw)
In-Reply-To: <cover.1533138685.git.mchehab+samsung@kernel.org>
In-Reply-To: <cover.1533138685.git.mchehab+samsung@kernel.org>

As we don't need anymore to share pad numbers with similar
drivers, use its own pad definition instead of a global
model.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 drivers/media/dvb-frontends/au8522_decoder.c | 12 ++++++------
 drivers/media/dvb-frontends/au8522_priv.h    |  9 ++++++++-
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/drivers/media/dvb-frontends/au8522_decoder.c b/drivers/media/dvb-frontends/au8522_decoder.c
index 583fdaa7339f..b2dd20ffd002 100644
--- a/drivers/media/dvb-frontends/au8522_decoder.c
+++ b/drivers/media/dvb-frontends/au8522_decoder.c
@@ -718,12 +718,12 @@ static int au8522_probe(struct i2c_client *client,
 	v4l2_i2c_subdev_init(sd, client, &au8522_ops);
 #if defined(CONFIG_MEDIA_CONTROLLER)
 
-	state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
-	state->pads[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
-	state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
-	state->pads[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;
-	state->pads[DEMOD_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE;
-	state->pads[DEMOD_PAD_AUDIO_OUT].sig_type = PAD_SIGNAL_AUDIO;
+	state->pads[AU8522_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
+	state->pads[AU8522_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
+	state->pads[AU8522_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
+	state->pads[AU8522_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;
+	state->pads[AU8522_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE;
+	state->pads[AU8522_PAD_AUDIO_OUT].sig_type = PAD_SIGNAL_AUDIO;
 	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;
 
 	ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
diff --git a/drivers/media/dvb-frontends/au8522_priv.h b/drivers/media/dvb-frontends/au8522_priv.h
index 2043c1744753..68299d2705f7 100644
--- a/drivers/media/dvb-frontends/au8522_priv.h
+++ b/drivers/media/dvb-frontends/au8522_priv.h
@@ -40,6 +40,13 @@
 #define AU8522_DIGITAL_MODE 1
 #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 i2c_client *c;
 	struct i2c_adapter *i2c;
@@ -71,7 +78,7 @@ struct au8522_state {
 	struct v4l2_ctrl_handler hdl;
 
 #ifdef CONFIG_MEDIA_CONTROLLER
-	struct media_pad pads[DEMOD_NUM_PADS];
+	struct media_pad pads[AU8522_NUM_PADS];
 #endif
 };
 
-- 
2.17.1

  parent reply	other threads:[~2018-08-01 17:41 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-01 15:55 [PATCH 00/13] Better handle pads for tuning/decoder part of the devices Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 01/13] media: v4l2: remove VBI output pad Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 02/13] media: v4l2: taint pads with the signal types for consumer devices Mauro Carvalho Chehab
2018-09-26 14:09   ` Laurent Pinchart
2018-09-27 10:01     ` Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 03/13] v4l2-mc: switch it to use the new approach to setup pipelines Mauro Carvalho Chehab
2018-09-26 14:44   ` Laurent Pinchart
2018-09-27 10:40     ` Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 04/13] media: dvb: use signals to discover pads Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 05/13] media: au0828: use signals instead of hardcoding a pad number Mauro Carvalho Chehab
2018-08-01 15:55 ` Mauro Carvalho Chehab [this message]
2018-08-01 15:55 ` [PATCH 07/13] media: msp3400: declare its own pads Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 08/13] media: saa7115: " Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 09/13] media: tvp5150: " Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 10/13] media: si2157: " Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 11/13] media: saa7134: " Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 12/13] media: mxl111sf: " Mauro Carvalho Chehab
2018-08-01 15:55 ` [PATCH 13/13] media: v4l2-mc: get rid of global pad indexes Mauro Carvalho Chehab
2018-08-02  9:08   ` Hans Verkuil
2018-08-02  9:30     ` Mauro Carvalho Chehab
2018-08-02  9:12 ` [PATCH 00/13] Better handle pads for tuning/decoder part of the devices Hans Verkuil
2018-08-02  9:39   ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=727ba77c1e3fe51af8fadd6029291886f42176c1.1533138685.git.mchehab+samsung@kernel.org \
    --to=mchehab+samsung@kernel.org \
    --cc=dheitmueller@kernellabs.com \
    --cc=gustavo@embeddedor.com \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.