diff mbox

[v1,10/12] media: rcar: vin: Add digital input mask to vin_dev

Message ID 1497891889-8038-11-git-send-email-jacopo+renesas@jmondi.org (mailing list archive)
State Changes Requested
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Jacopo Mondi June 19, 2017, 5:04 p.m. UTC
Add bitmask to enumerate VIN channel identifiers that support digital
video inputs.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 drivers/media/platform/rcar-vin/rcar-core.c | 4 ++++
 drivers/media/platform/rcar-vin/rcar-vin.h  | 4 ++++
 2 files changed, 8 insertions(+)
diff mbox

Patch

diff --git a/drivers/media/platform/rcar-vin/rcar-core.c b/drivers/media/platform/rcar-vin/rcar-core.c
index 6e5d84a..1d0b492 100644
--- a/drivers/media/platform/rcar-vin/rcar-core.c
+++ b/drivers/media/platform/rcar-vin/rcar-core.c
@@ -1028,6 +1028,8 @@  static const struct rvin_info rcar_info_r8a7795 = {
 			{ .csi = RVIN_CSI21, .chan = 3 },
 		},
 	},
+
+	.din_mask = BIT(4) | BIT(5),
 };
 
 static const struct rvin_info rcar_info_r8a7796 = {
@@ -1088,6 +1090,8 @@  static const struct rvin_info rcar_info_r8a7796 = {
 			{ .csi = RVIN_CSI20, .chan = 3 },
 		},
 	},
+
+	.din_mask = BIT(4) | BIT(5),
 };
 
 static const struct of_device_id rvin_of_id_table[] = {
diff --git a/drivers/media/platform/rcar-vin/rcar-vin.h b/drivers/media/platform/rcar-vin/rcar-vin.h
index 4361de9..333ef3b 100644
--- a/drivers/media/platform/rcar-vin/rcar-vin.h
+++ b/drivers/media/platform/rcar-vin/rcar-vin.h
@@ -119,6 +119,8 @@  struct rvin_group_chsel {
  *
  * num_chsels:		number of possible chsel values for this VIN
  * chsels:		routing table VIN <-> CSI-2 for the chsel values
+ *
+ * din_mask:		mask of VIN channels IDs supporting digital input
  */
 struct rvin_info {
 	enum chip_id chip;
@@ -129,6 +131,8 @@  struct rvin_info {
 
 	unsigned int num_chsels;
 	struct rvin_group_chsel chsels[RCAR_VIN_NUM][RCAR_CHSEL_MAX];
+
+	unsigned int din_mask;
 };
 
 /**