media: video: tegra: ov5650: Clean up headers to match latest userspace
authorRebecca Schultz Zavin <rebecca@android.com>
Fri, 24 Sep 2010 05:07:59 +0000 (22:07 -0700)
committerColin Cross <ccross@android.com>
Thu, 7 Oct 2010 00:01:33 +0000 (17:01 -0700)
Change-Id: I57cbdb7aec24a1dd8942e8fa341a735fdacf08e5
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
drivers/media/video/tegra/ov5650.c
include/media/ov5650.h

index 3c6f372b97cc8e26975694f6fd48d04293feb974..bc57956a49bf90a67ae66f75d4963e64c6eff1c1 100755 (executable)
@@ -592,7 +592,8 @@ static int ov5650_get_otp(struct ov5650_info *info, void __user *ubuffer)
        }
 
        /* Serial number is BE. */
-       info->otp_data.serial_num = __be32_to_cpu(info->otp_data.serial_num);
+       info->otp_data.module_serial_num =
+               __be32_to_cpu(info->otp_data.module_serial_num);
 
        /* Read the CRC and compared to computed. */
        i = offsetof(struct ov5650_otp_data, crc);
index f52c2e5566668b6b10dbd483d091ed147cbfcaaa..083cf6e21eae9d1e2a65aed1a07be6a2c29d94a0 100755 (executable)
@@ -36,7 +36,8 @@ enum ov5650_test_pattern {
 };
 
 struct ov5650_otp_data {
-       __u8 reserved1[6];
+       /* Only the first 5 bytes are actually used. */
+       __u8 sensor_serial_num[6];
        __u8 part_num[8];
        __u8 lens_id[1];
        __u8 manufacture_id[2];
@@ -44,11 +45,14 @@ struct ov5650_otp_data {
        __u8 manufacture_date[9];
        __u8 manufacture_line[2];
 
-       __u32 serial_num;
-       __u8 focuser_cal[16];
+       __u32 module_serial_num;
+       __u8 focuser_liftoff[2];
+       __u8 focuser_macro[2];
+       __u8 reserved1[12];
        __u8 shutter_cal[16];
        __u8 reserved2[183];
 
+       /* Big-endian. CRC16 over 0x00-0x41 (inclusive) */
        __u16 crc;
        __u8 reserved3[3];
        __u8 auto_load[2];
@@ -57,9 +61,9 @@ struct ov5650_otp_data {
 struct ov5650_mode {
        int xres;
        int yres;
-       u32 frame_length;
-       u32 coarse_time;
-       u16 gain;
+       __u32 frame_length;
+       __u32 coarse_time;
+       __u16 gain;
 };
 #ifdef __KERNEL__
 struct ov5650_platform_data {