diff options
| author | Phil Breczinski <pbreczinski@nvidia.com> | 2013-09-16 16:39:33 -0700 |
|---|---|---|
| committer | Ajay Nandakumar <anandakumarm@nvidia.com> | 2013-10-03 19:17:28 +0530 |
| commit | 7f22f5ef09d36e30fb11a7f4d108d8027b1e33ce (patch) | |
| tree | 4ddebb6a83f4d1d16022805e44f9c1566ec61d8d | |
| parent | 2f5f9f06e41ace0bb9ff5da57922ee5f7ce82852 (diff) | |
media: platform: tegra: ov5693: update fuseid read
Update ov5693's fuse ID read ioctl handling to match
the standard.
Bug 1369367
Change-Id: I600bd459ca4c8315b4f2bfe243a3e36e5ffc8aa7
Signed-off-by: Phil Breczinski <pbreczinski@nvidia.com>
(cherry picked from commit 84654e65576d0c9d735d889959786c8883678689)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
| -rw-r--r-- | drivers/media/platform/tegra/ov5693.c | 11 | ||||
| -rw-r--r-- | include/media/ov5693.h | 7 |
2 files changed, 7 insertions, 11 deletions
diff --git a/drivers/media/platform/tegra/ov5693.c b/drivers/media/platform/tegra/ov5693.c index 23d38c03c981..3e64faa91fd1 100644 --- a/drivers/media/platform/tegra/ov5693.c +++ b/drivers/media/platform/tegra/ov5693.c @@ -30,6 +30,7 @@ #include <linux/of_device.h> #include <linux/of_gpio.h> #include <media/ov5693.h> +#include <media/nvc.h> #define OV5693_ID 0x5693 #define OV5693_SENSOR_TYPE NVC_IMAGER_TYPE_RAW @@ -66,7 +67,7 @@ struct ov5693_info { unsigned test_pattern; struct nvc_imager_static_nvc sdata; u8 bin_en; - struct ov5693_fuseid fuseid; + struct nvc_fuseid fuseid; struct regmap *regmap; struct regulator *ext_vcm_vdd; }; @@ -1779,11 +1780,11 @@ ov5693_mode_wr_err: static int ov5693_get_fuse_id(struct ov5693_info *info) { - ov5693_i2c_rd8(info, 0x300A, &info->fuseid.id[0]); - ov5693_i2c_rd8(info, 0x300B, &info->fuseid.id[1]); + ov5693_i2c_rd8(info, 0x300A, &info->fuseid.data[0]); + ov5693_i2c_rd8(info, 0x300B, &info->fuseid.data[1]); info->fuseid.size = 2; dev_dbg(&info->i2c_client->dev, "ov5693 fuse_id: %x,%x\n", - info->fuseid.id[0], info->fuseid.id[1]); + info->fuseid.data[0], info->fuseid.data[1]); return 0; } @@ -1849,7 +1850,7 @@ static long ov5693_ioctl(struct file *file, unsigned int cmd, unsigned long arg) } if (copy_to_user((void __user *)arg, &info->fuseid, - sizeof(struct ov5693_fuseid))) { + sizeof(struct nvc_fuseid))) { dev_dbg(&info->i2c_client->dev, "%s:Fail copy fuse id to user space\n", __func__); return -EFAULT; diff --git a/include/media/ov5693.h b/include/media/ov5693.h index 8980ed52202b..ea4f062c866f 100644 --- a/include/media/ov5693.h +++ b/include/media/ov5693.h @@ -33,7 +33,7 @@ * This can be either stereo , leftOnly or rightOnly */ #define OV5693_IOCTL_SET_CAMERA_MODE _IOW('o', 10, __u32) #define OV5693_IOCTL_SYNC_SENSORS _IOW('o', 11, __u32) -#define OV5693_IOCTL_GET_FUSEID _IOR('o', 12, struct ov5693_fuseid) +#define OV5693_IOCTL_GET_FUSEID _IOR('o', 12, struct nvc_fuseid) struct ov5693_mode { @@ -54,11 +54,6 @@ struct ov5693_ae { __u8 gain_enable; }; -struct ov5693_fuseid { - __u32 size; - __u8 id[16]; -}; - /* See notes in the nvc.h file on the GPIO usage */ enum ov5693_gpio_type { OV5693_GPIO_TYPE_PWRDN = 0, |
