aboutsummaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-01-30 14:32:21 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 12:00:21 -0400
commit05cacb176712cbbd3ae0331d92fe57741ef2d2ba (patch)
tree50c6ac8a152648175433e2acf3ea6e84a292f16d /include/media
parentc269887c2da49ad55ff59217255b0e95b0cec0e9 (diff)
[media] adv7604: Store I2C addresses and clients in arrays
This allows replacing duplicate code blocks by loops over the arrays. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/adv7604.h30
1 files changed, 18 insertions, 12 deletions
diff --git a/include/media/adv7604.h b/include/media/adv7604.h
index d8b2cb8f5dce..276135b7faa3 100644
--- a/include/media/adv7604.h
+++ b/include/media/adv7604.h
@@ -79,6 +79,23 @@ enum adv7604_int1_config {
79 ADV7604_INT1_CONFIG_DISABLED, 79 ADV7604_INT1_CONFIG_DISABLED,
80}; 80};
81 81
82enum adv7604_page {
83 ADV7604_PAGE_IO,
84 ADV7604_PAGE_AVLINK,
85 ADV7604_PAGE_CEC,
86 ADV7604_PAGE_INFOFRAME,
87 ADV7604_PAGE_ESDP,
88 ADV7604_PAGE_DPP,
89 ADV7604_PAGE_AFE,
90 ADV7604_PAGE_REP,
91 ADV7604_PAGE_EDID,
92 ADV7604_PAGE_HDMI,
93 ADV7604_PAGE_TEST,
94 ADV7604_PAGE_CP,
95 ADV7604_PAGE_VDP,
96 ADV7604_PAGE_MAX,
97};
98
82/* Platform dependent definition */ 99/* Platform dependent definition */
83struct adv7604_platform_data { 100struct adv7604_platform_data {
84 /* DIS_PWRDNB: 1 if the PWRDNB pin is unused and unconnected */ 101 /* DIS_PWRDNB: 1 if the PWRDNB pin is unused and unconnected */
@@ -125,18 +142,7 @@ struct adv7604_platform_data {
125 unsigned hdmi_free_run_mode; 142 unsigned hdmi_free_run_mode;
126 143
127 /* i2c addresses: 0 == use default */ 144 /* i2c addresses: 0 == use default */
128 u8 i2c_avlink; 145 u8 i2c_addresses[ADV7604_PAGE_MAX];
129 u8 i2c_cec;
130 u8 i2c_infoframe;
131 u8 i2c_esdp;
132 u8 i2c_dpp;
133 u8 i2c_afe;
134 u8 i2c_repeater;
135 u8 i2c_edid;
136 u8 i2c_hdmi;
137 u8 i2c_test;
138 u8 i2c_cp;
139 u8 i2c_vdp;
140}; 146};
141 147
142enum adv7604_pad { 148enum adv7604_pad {