summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-01-30 16:32:21 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 13:00:21 -0300
commit05cacb176712cbbd3ae0331d92fe57741ef2d2ba (patch)
tree50c6ac8a152648175433e2acf3ea6e84a292f16d /include/media
parentc269887c2da49ad55ff59217255b0e95b0cec0e9 (diff)
downloadop-kernel-dev-05cacb176712cbbd3ae0331d92fe57741ef2d2ba.zip
op-kernel-dev-05cacb176712cbbd3ae0331d92fe57741ef2d2ba.tar.gz
[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 d8b2cb8..276135b 100644
--- a/include/media/adv7604.h
+++ b/include/media/adv7604.h
@@ -79,6 +79,23 @@ enum adv7604_int1_config {
ADV7604_INT1_CONFIG_DISABLED,
};
+enum adv7604_page {
+ ADV7604_PAGE_IO,
+ ADV7604_PAGE_AVLINK,
+ ADV7604_PAGE_CEC,
+ ADV7604_PAGE_INFOFRAME,
+ ADV7604_PAGE_ESDP,
+ ADV7604_PAGE_DPP,
+ ADV7604_PAGE_AFE,
+ ADV7604_PAGE_REP,
+ ADV7604_PAGE_EDID,
+ ADV7604_PAGE_HDMI,
+ ADV7604_PAGE_TEST,
+ ADV7604_PAGE_CP,
+ ADV7604_PAGE_VDP,
+ ADV7604_PAGE_MAX,
+};
+
/* Platform dependent definition */
struct adv7604_platform_data {
/* DIS_PWRDNB: 1 if the PWRDNB pin is unused and unconnected */
@@ -125,18 +142,7 @@ struct adv7604_platform_data {
unsigned hdmi_free_run_mode;
/* i2c addresses: 0 == use default */
- u8 i2c_avlink;
- u8 i2c_cec;
- u8 i2c_infoframe;
- u8 i2c_esdp;
- u8 i2c_dpp;
- u8 i2c_afe;
- u8 i2c_repeater;
- u8 i2c_edid;
- u8 i2c_hdmi;
- u8 i2c_test;
- u8 i2c_cp;
- u8 i2c_vdp;
+ u8 i2c_addresses[ADV7604_PAGE_MAX];
};
enum adv7604_pad {
OpenPOWER on IntegriCloud