summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorDavid Wang <davidw@nvidia.com>2013-11-05 12:45:47 -0800
committerSachin Nikam <snikam@nvidia.com>2013-11-05 23:21:05 -0800
commit61c61b54a9ea3b54e9e08b2b8e71e71e8d1b3a88 (patch)
treef894831469cfc1c732a254c35091971e8b722db4 /include/media
parentc849795ceb9735c07685c01a7b1a855e336dbb51 (diff)
media: platform: tegra: OV5693 EEPROM support
Add EEPROM read/write support for OV5693. Bug 1390863 Change-Id: I01198c27f56bef953b33598f7866a26123c910de Signed-off-by: David Wang <davidw@nvidia.com> Reviewed-on: http://git-master/r/326313 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Charlie Huang <chahuang@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ov5693.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/media/ov5693.h b/include/media/ov5693.h
index 27fc25a49bad..1804efab1539 100644
--- a/include/media/ov5693.h
+++ b/include/media/ov5693.h
@@ -40,9 +40,16 @@
struct ov5693_otp_bank)
#define OV5693_IOCTL_SET_CAL_DATA _IOW('o', 15, \
struct ov5693_cal_data)
+#define OV5693_IOCTL_GET_EEPROM_DATA _IOR('o', 20, __u8 *)
+#define OV5693_IOCTL_SET_EEPROM_DATA _IOW('o', 21, __u8 *)
#define OV5693_INVALID_COARSE_TIME -1
+#define OV5693_EEPROM_ADDRESS 0x50
+#define OV5693_EEPROM_SIZE 1024
+#define OV5693_EEPROM_BLOCK_SIZE (1 << 8)
+#define OV5693_EEPROM_NUM_BLOCKS \
+ (OV5693_EEPROM_SIZE / OV5693_EEPROM_BLOCK_SIZE)
struct ov5693_mode {
int res_x;
@@ -94,6 +101,13 @@ enum ov5693_gpio_type {
OV5693_GPIO_TYPE_PWRDN = 0,
};
+struct ov5693_eeprom_data {
+ struct i2c_client *i2c_client;
+ struct i2c_adapter *adap;
+ struct i2c_board_info brd;
+ struct regmap *regmap;
+};
+
struct ov5693_power_rail {
struct regulator *dvdd;
struct regulator *avdd;