Lines Matching refs:rc
84 #define FATAL_ERROR(rc) ((rc) < 0 && (rc) != -EPERM) argument
665 int rc; in reg_w() local
671 rc = usb_control_msg(ov->dev, in reg_w()
678 if (rc < 0) in reg_w()
679 err("reg write: error %d: %s", rc, symbolic(urb_errlist, rc)); in reg_w()
681 return rc; in reg_w()
689 int rc; in reg_r() local
692 rc = usb_control_msg(ov->dev, in reg_r()
698 if (rc < 0) { in reg_r()
699 err("reg read: error %d: %s", rc, symbolic(urb_errlist, rc)); in reg_r()
701 rc = ov->cbuf[0]; in reg_r()
707 return rc; in reg_r()
744 int rc; in ov518_reg_w32() local
752 rc = usb_control_msg(ov->dev, in ov518_reg_w32()
759 if (rc < 0) in ov518_reg_w32()
760 err("reg write multiple: error %d: %s", rc, in ov518_reg_w32()
761 symbolic(urb_errlist, rc)); in ov518_reg_w32()
763 return rc; in ov518_reg_w32()
772 int i, rc, reg = R511_COMP_LUT_BEGIN; in ov511_upload_quan_tables() local
783 rc = reg_w(ov, reg, val0); in ov511_upload_quan_tables()
784 if (rc < 0) in ov511_upload_quan_tables()
785 return rc; in ov511_upload_quan_tables()
794 rc = reg_w(ov, reg + OV511_QUANTABLESIZE/2, val0); in ov511_upload_quan_tables()
795 if (rc < 0) in ov511_upload_quan_tables()
796 return rc; in ov511_upload_quan_tables()
812 int i, rc, reg = R511_COMP_LUT_BEGIN; in ov518_upload_quan_tables() local
823 rc = reg_w(ov, reg, val0); in ov518_upload_quan_tables()
824 if (rc < 0) in ov518_upload_quan_tables()
825 return rc; in ov518_upload_quan_tables()
834 rc = reg_w(ov, reg + OV518_QUANTABLESIZE/2, val0); in ov518_upload_quan_tables()
835 if (rc < 0) in ov518_upload_quan_tables()
836 return rc; in ov518_upload_quan_tables()
848 int rc; in ov51x_reset() local
856 rc = reg_w(ov, R51x_SYS_RESET, reset_type); in ov51x_reset()
857 rc = reg_w(ov, R51x_SYS_RESET, 0); in ov51x_reset()
859 if (rc < 0) in ov51x_reset()
862 return rc; in ov51x_reset()
881 int rc; in ov518_i2c_write_internal() local
886 rc = reg_w(ov, R51x_I2C_SADDR_3, reg); in ov518_i2c_write_internal()
887 if (rc < 0) return rc; in ov518_i2c_write_internal()
890 rc = reg_w(ov, R51x_I2C_DATA, value); in ov518_i2c_write_internal()
891 if (rc < 0) return rc; in ov518_i2c_write_internal()
894 rc = reg_w(ov, R518_I2C_CTL, 0x01); in ov518_i2c_write_internal()
895 if (rc < 0) return rc; in ov518_i2c_write_internal()
906 int rc, retries; in ov511_i2c_write_internal() local
913 rc = reg_w(ov, R51x_I2C_SADDR_3, reg); in ov511_i2c_write_internal()
914 if (rc < 0) return rc; in ov511_i2c_write_internal()
917 rc = reg_w(ov, R51x_I2C_DATA, value); in ov511_i2c_write_internal()
918 if (rc < 0) return rc; in ov511_i2c_write_internal()
921 rc = reg_w(ov, R511_I2C_CTL, 0x01); in ov511_i2c_write_internal()
922 if (rc < 0) return rc; in ov511_i2c_write_internal()
924 do rc = reg_r(ov, R511_I2C_CTL); in ov511_i2c_write_internal()
925 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */ in ov511_i2c_write_internal()
926 if (rc < 0) return rc; in ov511_i2c_write_internal()
928 if ((rc&2) == 0) /* Ack? */ in ov511_i2c_write_internal()
951 int rc, value; in ov518_i2c_read_internal() local
954 rc = reg_w(ov, R51x_I2C_SADDR_2, reg); in ov518_i2c_read_internal()
955 if (rc < 0) return rc; in ov518_i2c_read_internal()
958 rc = reg_w(ov, R518_I2C_CTL, 0x03); in ov518_i2c_read_internal()
959 if (rc < 0) return rc; in ov518_i2c_read_internal()
962 rc = reg_w(ov, R518_I2C_CTL, 0x05); in ov518_i2c_read_internal()
963 if (rc < 0) return rc; in ov518_i2c_read_internal()
977 int rc, value, retries; in ov511_i2c_read_internal() local
982 rc = reg_w(ov, R51x_I2C_SADDR_2, reg); in ov511_i2c_read_internal()
983 if (rc < 0) return rc; in ov511_i2c_read_internal()
986 rc = reg_w(ov, R511_I2C_CTL, 0x03); in ov511_i2c_read_internal()
987 if (rc < 0) return rc; in ov511_i2c_read_internal()
989 do rc = reg_r(ov, R511_I2C_CTL); in ov511_i2c_read_internal()
990 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */ in ov511_i2c_read_internal()
991 if (rc < 0) return rc; in ov511_i2c_read_internal()
993 if ((rc&2) == 0) /* Ack? */ in ov511_i2c_read_internal()
1008 rc = reg_w(ov, R511_I2C_CTL, 0x05); in ov511_i2c_read_internal()
1009 if (rc < 0) return rc; in ov511_i2c_read_internal()
1011 do rc = reg_r(ov, R511_I2C_CTL); in ov511_i2c_read_internal()
1012 while (rc > 0 && ((rc&1) == 0)); /* Retry until idle */ in ov511_i2c_read_internal()
1013 if (rc < 0) return rc; in ov511_i2c_read_internal()
1015 if ((rc&2) == 0) /* Ack? */ in ov511_i2c_read_internal()
1019 rc = reg_w(ov, R511_I2C_CTL, 0x10); in ov511_i2c_read_internal()
1020 if (rc < 0) return rc; in ov511_i2c_read_internal()
1033 rc = reg_w(ov, R511_I2C_CTL, 0x05); in ov511_i2c_read_internal()
1034 if (rc < 0) in ov511_i2c_read_internal()
1035 return rc; in ov511_i2c_read_internal()
1044 int rc; in i2c_r() local
1049 rc = ov518_i2c_read_internal(ov, reg); in i2c_r()
1051 rc = ov511_i2c_read_internal(ov, reg); in i2c_r()
1055 return rc; in i2c_r()
1061 int rc; in i2c_w() local
1066 rc = ov518_i2c_write_internal(ov, reg, value); in i2c_w()
1068 rc = ov511_i2c_write_internal(ov, reg, value); in i2c_w()
1072 return rc; in i2c_w()
1082 int rc; in ov51x_i2c_write_mask_internal() local
1089 rc = ov518_i2c_read_internal(ov, reg); in ov51x_i2c_write_mask_internal()
1091 rc = ov511_i2c_read_internal(ov, reg); in ov51x_i2c_write_mask_internal()
1092 if (rc < 0) in ov51x_i2c_write_mask_internal()
1093 return rc; in ov51x_i2c_write_mask_internal()
1095 oldval = (unsigned char) rc; in ov51x_i2c_write_mask_internal()
1118 int rc; in i2c_w_mask() local
1121 rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask); in i2c_w_mask()
1124 return rc; in i2c_w_mask()
1135 int rc; in i2c_set_slave_internal() local
1137 rc = reg_w(ov, R51x_I2C_W_SID, slave); in i2c_set_slave_internal()
1138 if (rc < 0) return rc; in i2c_set_slave_internal()
1140 rc = reg_w(ov, R51x_I2C_R_SID, slave + 1); in i2c_set_slave_internal()
1141 if (rc < 0) return rc; in i2c_set_slave_internal()
1154 int rc = 0; in i2c_w_slave() local
1159 rc = i2c_set_slave_internal(ov, slave); in i2c_w_slave()
1160 if (rc < 0) goto out; in i2c_w_slave()
1162 rc = ov51x_i2c_write_mask_internal(ov, reg, value, mask); in i2c_w_slave()
1170 return rc; in i2c_w_slave()
1179 int rc; in i2c_r_slave() local
1184 rc = i2c_set_slave_internal(ov, slave); in i2c_r_slave()
1185 if (rc < 0) goto out; in i2c_r_slave()
1188 rc = ov518_i2c_read_internal(ov, reg); in i2c_r_slave()
1190 rc = ov511_i2c_read_internal(ov, reg); in i2c_r_slave()
1198 return rc; in i2c_r_slave()
1205 int rc; in ov51x_set_slave_ids() local
1209 rc = i2c_set_slave_internal(ov, sid); in ov51x_set_slave_ids()
1210 if (rc < 0) goto out; in ov51x_set_slave_ids()
1213 rc = ov51x_reset(ov, OV511_RESET_NOREGS); in ov51x_set_slave_ids()
1214 if (rc < 0) goto out; in ov51x_set_slave_ids()
1218 return rc; in ov51x_set_slave_ids()
1224 int rc; in write_regvals() local
1228 if ((rc = reg_w(ov, pRegvals->reg, pRegvals->val)) < 0) in write_regvals()
1229 return rc; in write_regvals()
1231 if ((rc = i2c_w(ov, pRegvals->reg, pRegvals->val)) < 0) in write_regvals()
1232 return rc; in write_regvals()
1246 int i, rc; in dump_i2c_range() local
1249 rc = i2c_r(ov, i); in dump_i2c_range()
1250 info("Sensor[0x%02X] = 0x%02X", i, rc); in dump_i2c_range()
1264 int i, rc; in dump_reg_range() local
1267 rc = reg_r(ov, i); in dump_reg_range()
1268 info("OV511[0x%02X] = 0x%02X", i, rc); in dump_reg_range()
1556 int rc = 0; in ov511_init_compression() local
1570 rc = -EIO; in ov511_init_compression()
1577 return rc; in ov511_init_compression()
1584 int rc = 0; in ov518_init_compression() local
1589 rc = -EIO; in ov518_init_compression()
1596 return rc; in ov518_init_compression()
1605 int rc; in sensor_set_contrast() local
1617 rc = i2c_w(ov, OV7610_REG_CNT, val >> 8); in sensor_set_contrast()
1618 if (rc < 0) in sensor_set_contrast()
1624 rc = i2c_w_mask(ov, OV7610_REG_CNT, val >> 12, 0x0f); in sensor_set_contrast()
1625 if (rc < 0) in sensor_set_contrast()
1637 rc = i2c_w(ov, 0x64, ctab[val>>12]); in sensor_set_contrast()
1638 if (rc < 0) in sensor_set_contrast()
1644 rc = i2c_w(ov, 0x0b, val >> 9); in sensor_set_contrast()
1645 if (rc < 0) in sensor_set_contrast()
1652 rc = -EPERM; in sensor_set_contrast()
1657 rc = 0; /* Success */ in sensor_set_contrast()
1663 return rc; in sensor_set_contrast()
1670 int rc; in sensor_get_contrast() local
1675 rc = i2c_r(ov, OV7610_REG_CNT); in sensor_get_contrast()
1676 if (rc < 0) in sensor_get_contrast()
1677 return rc; in sensor_get_contrast()
1679 *val = rc << 8; in sensor_get_contrast()
1682 rc = i2c_r(ov, OV7610_REG_CNT); in sensor_get_contrast()
1683 if (rc < 0) in sensor_get_contrast()
1684 return rc; in sensor_get_contrast()
1686 *val = rc << 12; in sensor_get_contrast()
1690 rc = i2c_r(ov, 0x64); in sensor_get_contrast()
1691 if (rc < 0) in sensor_get_contrast()
1692 return rc; in sensor_get_contrast()
1694 *val = (rc & 0xfe) << 8; in sensor_get_contrast()
1716 int rc; in sensor_set_brightness() local
1729 rc = i2c_w(ov, OV7610_REG_BRT, val >> 8); in sensor_set_brightness()
1730 if (rc < 0) in sensor_set_brightness()
1736 rc = i2c_w(ov, OV7610_REG_BRT, val >> 8); in sensor_set_brightness()
1737 if (rc < 0) in sensor_set_brightness()
1742 rc = i2c_w(ov, 0x0a, val >> 8); in sensor_set_brightness()
1743 if (rc < 0) in sensor_set_brightness()
1748 rc = -EPERM; in sensor_set_brightness()
1752 rc = 0; /* Success */ in sensor_set_brightness()
1758 return rc; in sensor_set_brightness()
1765 int rc; in sensor_get_brightness() local
1773 rc = i2c_r(ov, OV7610_REG_BRT); in sensor_get_brightness()
1774 if (rc < 0) in sensor_get_brightness()
1775 return rc; in sensor_get_brightness()
1777 *val = rc << 8; in sensor_get_brightness()
1799 int rc; in sensor_set_saturation() local
1812 rc = i2c_w(ov, OV7610_REG_SAT, val >> 8); in sensor_set_saturation()
1813 if (rc < 0) in sensor_set_saturation()
1821 rc = i2c_w(ov, OV7610_REG_SAT, val >> 8); in sensor_set_saturation()
1822 if (rc < 0) in sensor_set_saturation()
1826 rc = i2c_w(ov, 0x0c, val >> 9); in sensor_set_saturation()
1827 if (rc < 0) in sensor_set_saturation()
1832 rc = -EPERM; in sensor_set_saturation()
1836 rc = 0; /* Success */ in sensor_set_saturation()
1842 return rc; in sensor_set_saturation()
1849 int rc; in sensor_get_saturation() local
1856 rc = i2c_r(ov, OV7610_REG_SAT); in sensor_get_saturation()
1857 if (rc < 0) in sensor_get_saturation()
1858 return rc; in sensor_get_saturation()
1860 *val = rc << 8; in sensor_get_saturation()
1869 rc = i2c_r(ov, OV7610_REG_SAT); in sensor_get_saturation()
1870 if (rc < 0) in sensor_get_saturation()
1871 return rc; in sensor_get_saturation()
1873 *val = rc << 8; in sensor_get_saturation()
1895 int rc; in sensor_set_hue() local
1907 rc = i2c_w(ov, OV7610_REG_RED, 0xFF - (val >> 8)); in sensor_set_hue()
1908 if (rc < 0) in sensor_set_hue()
1911 rc = i2c_w(ov, OV7610_REG_BLUE, val >> 8); in sensor_set_hue()
1912 if (rc < 0) in sensor_set_hue()
1918 rc = i2c_w(ov, 0x7a, (unsigned char)(val >> 8) + 0xb); in sensor_set_hue()
1919 if (rc < 0) in sensor_set_hue()
1922 rc = i2c_w(ov, 0x79, (unsigned char)(val >> 8) + 0xb); in sensor_set_hue()
1923 if (rc < 0) in sensor_set_hue()
1928 rc = i2c_w(ov, 0x0d, (val + 32768) >> 8); in sensor_set_hue()
1929 if (rc < 0) in sensor_set_hue()
1934 rc = -EPERM; in sensor_set_hue()
1938 rc = 0; /* Success */ in sensor_set_hue()
1944 return rc; in sensor_set_hue()
1951 int rc; in sensor_get_hue() local
1957 rc = i2c_r(ov, OV7610_REG_BLUE); in sensor_get_hue()
1958 if (rc < 0) in sensor_get_hue()
1959 return rc; in sensor_get_hue()
1961 *val = rc << 8; in sensor_get_hue()
1964 rc = i2c_r(ov, 0x7a); in sensor_get_hue()
1965 if (rc < 0) in sensor_get_hue()
1966 return rc; in sensor_get_hue()
1968 *val = rc << 8; in sensor_get_hue()
1989 int rc; in sensor_set_picture() local
1998 rc = sensor_set_contrast(ov, p->contrast); in sensor_set_picture()
1999 if (FATAL_ERROR(rc)) in sensor_set_picture()
2000 return rc; in sensor_set_picture()
2002 rc = sensor_set_brightness(ov, p->brightness); in sensor_set_picture()
2003 if (FATAL_ERROR(rc)) in sensor_set_picture()
2004 return rc; in sensor_set_picture()
2006 rc = sensor_set_saturation(ov, p->colour); in sensor_set_picture()
2007 if (FATAL_ERROR(rc)) in sensor_set_picture()
2008 return rc; in sensor_set_picture()
2010 rc = sensor_set_hue(ov, p->hue); in sensor_set_picture()
2011 if (FATAL_ERROR(rc)) in sensor_set_picture()
2012 return rc; in sensor_set_picture()
2020 int rc; in sensor_get_picture() local
2027 rc = sensor_get_contrast(ov, &(p->contrast)); in sensor_get_picture()
2028 if (FATAL_ERROR(rc)) in sensor_get_picture()
2029 return rc; in sensor_get_picture()
2031 rc = sensor_get_brightness(ov, &(p->brightness)); in sensor_get_picture()
2032 if (FATAL_ERROR(rc)) in sensor_get_picture()
2033 return rc; in sensor_get_picture()
2035 rc = sensor_get_saturation(ov, &(p->colour)); in sensor_get_picture()
2036 if (FATAL_ERROR(rc)) in sensor_get_picture()
2037 return rc; in sensor_get_picture()
2039 rc = sensor_get_hue(ov, &(p->hue)); in sensor_get_picture()
2040 if (FATAL_ERROR(rc)) in sensor_get_picture()
2041 return rc; in sensor_get_picture()
2055 int rc; in sensor_set_exposure() local
2070 rc = i2c_w(ov, 0x10, val); in sensor_set_exposure()
2071 if (rc < 0) in sensor_set_exposure()
2085 rc = 0; /* Success */ in sensor_set_exposure()
2091 return rc; in sensor_set_exposure()
2099 int rc; in sensor_get_exposure() local
2108 rc = i2c_r(ov, 0x10); in sensor_get_exposure()
2109 if (rc < 0) in sensor_get_exposure()
2110 return rc; in sensor_get_exposure()
2112 *val = rc; in sensor_get_exposure()
2217 int rc; in sensor_set_banding_filter() local
2227 rc = i2c_w_mask(ov, 0x2d, enable?0x04:0x00, 0x04); in sensor_set_banding_filter()
2228 if (rc < 0) in sensor_set_banding_filter()
2229 return rc; in sensor_set_banding_filter()
2245 int rc; in sensor_set_auto_brightness() local
2255 rc = i2c_w_mask(ov, 0x2d, enable?0x10:0x00, 0x10); in sensor_set_auto_brightness()
2256 if (rc < 0) in sensor_set_auto_brightness()
2257 return rc; in sensor_set_auto_brightness()
2919 int rc = 0; in mode_init_regs() local
2925 rc = ov518_mode_init_regs(ov, width, height, mode, sub_flag); in mode_init_regs()
2927 rc = ov511_mode_init_regs(ov, width, height, mode, sub_flag); in mode_init_regs()
2930 if (FATAL_ERROR(rc)) in mode_init_regs()
2931 return rc; in mode_init_regs()
2940 rc = set_ov_sensor_window(ov, width, height, mode, sub_flag); in mode_init_regs()
2945 rc = -EINVAL; in mode_init_regs()
2955 rc = -EINVAL; in mode_init_regs()
2958 if (FATAL_ERROR(rc)) in mode_init_regs()
2959 return rc; in mode_init_regs()
2962 rc = sensor_set_auto_brightness(ov, ov->auto_brt); in mode_init_regs()
2963 if (FATAL_ERROR(rc)) in mode_init_regs()
2964 return rc; in mode_init_regs()
2966 rc = sensor_set_auto_exposure(ov, ov->auto_exp); in mode_init_regs()
2967 if (FATAL_ERROR(rc)) in mode_init_regs()
2968 return rc; in mode_init_regs()
2970 rc = sensor_set_banding_filter(ov, bandingfilter); in mode_init_regs()
2971 if (FATAL_ERROR(rc)) in mode_init_regs()
2972 return rc; in mode_init_regs()
2975 rc = sensor_set_light_freq(ov, lightfreq); in mode_init_regs()
2976 if (FATAL_ERROR(rc)) in mode_init_regs()
2977 return rc; in mode_init_regs()
2980 rc = sensor_set_backlight(ov, ov->backlight); in mode_init_regs()
2981 if (FATAL_ERROR(rc)) in mode_init_regs()
2982 return rc; in mode_init_regs()
2984 rc = sensor_set_mirror(ov, ov->mirror); in mode_init_regs()
2985 if (FATAL_ERROR(rc)) in mode_init_regs()
2986 return rc; in mode_init_regs()
4961 int rc; in ov51x_v4l1_ioctl_internal() local
4983 rc = wait_event_interruptible(frame->wq, in ov51x_v4l1_ioctl_internal()
4987 if (rc) in ov51x_v4l1_ioctl_internal()
4988 return rc; in ov51x_v4l1_ioctl_internal()
5058 int rc; in ov51x_v4l1_ioctl_internal() local
5060 rc = i2c_r_slave(ov, r->slave, r->reg); in ov51x_v4l1_ioctl_internal()
5061 if (rc < 0) in ov51x_v4l1_ioctl_internal()
5062 return rc; in ov51x_v4l1_ioctl_internal()
5064 r->value = rc; in ov51x_v4l1_ioctl_internal()
5081 int rc; in ov51x_v4l1_ioctl() local
5086 rc = video_usercopy(inode, file, cmd, arg, ov51x_v4l1_ioctl_internal); in ov51x_v4l1_ioctl()
5089 return rc; in ov51x_v4l1_ioctl()
5099 int i, rc = 0, frmx = -1; in ov51x_v4l1_read() local
5108 rc = -EFAULT; in ov51x_v4l1_read()
5113 rc = -EIO; in ov51x_v4l1_read()
5126 rc = -EAGAIN; in ov51x_v4l1_read()
5141 if ((rc = ov51x_new_frame(ov, frmx = 0))) { in ov51x_v4l1_read()
5151 rc = -EIO; in ov51x_v4l1_read()
5157 rc = wait_event_interruptible(frame->wq, in ov51x_v4l1_read()
5161 if (rc) in ov51x_v4l1_read()
5183 if ((rc = ov51x_new_frame(ov, frmx))) { in ov51x_v4l1_read()
5214 rc = -EFAULT; in ov51x_v4l1_read()
5230 if ((rc = ov51x_new_frame(ov, !frmx))) { in ov51x_v4l1_read()
5243 return rc; in ov51x_v4l1_read()
5313 int rc; in ov51x_control_ioctl() local
5347 rc = sensor_get_brightness(ov, &(opt.val)); in ov51x_control_ioctl()
5348 if (rc) return rc; in ov51x_control_ioctl()
5351 rc = sensor_get_saturation(ov, &(opt.val)); in ov51x_control_ioctl()
5352 if (rc) return rc; in ov51x_control_ioctl()
5355 rc = sensor_get_hue(ov, &(opt.val)); in ov51x_control_ioctl()
5356 if (rc) return rc; in ov51x_control_ioctl()
5359 rc = sensor_get_contrast(ov, &(opt.val)); in ov51x_control_ioctl()
5360 if (rc) return rc; in ov51x_control_ioctl()
5381 rc = sensor_set_brightness(ov, opt.val); in ov51x_control_ioctl()
5382 if (rc) return rc; in ov51x_control_ioctl()
5385 rc = sensor_set_saturation(ov, opt.val); in ov51x_control_ioctl()
5386 if (rc) return rc; in ov51x_control_ioctl()
5389 rc = sensor_set_hue(ov, opt.val); in ov51x_control_ioctl()
5390 if (rc) return rc; in ov51x_control_ioctl()
5393 rc = sensor_set_contrast(ov, opt.val); in ov51x_control_ioctl()
5394 if (rc) return rc; in ov51x_control_ioctl()
5445 rc = sensor_set_light_freq(ov, opt.val); in ov51x_control_ioctl()
5446 if (rc) return rc; in ov51x_control_ioctl()
5449 rc = sensor_set_banding_filter(ov, opt.val); in ov51x_control_ioctl()
5450 if (rc) return rc; in ov51x_control_ioctl()
5501 rc = i2c_r_slave(ov, r.slave, r.reg); in ov51x_control_ioctl()
5502 if (rc < 0) in ov51x_control_ioctl()
5503 return rc; in ov51x_control_ioctl()
5505 r.value = rc; in ov51x_control_ioctl()
5533 int rc; in ov7xx0_configure() local
5688 rc = i2c_r(ov, OV7610_REG_COM_I); in ov7xx0_configure()
5690 if (rc < 0) { in ov7xx0_configure()
5693 } else if ((rc & 3) == 3) { in ov7xx0_configure()
5696 } else if ((rc & 3) == 1) { in ov7xx0_configure()
5712 } else if ((rc & 3) == 0) { in ov7xx0_configure()
5716 err("Unknown image sensor version: %d", rc & 3); in ov7xx0_configure()
5749 int rc; in ov6xx0_configure() local
5860 rc = i2c_r(ov, OV7610_REG_COM_I); in ov6xx0_configure()
5862 if (rc < 0) { in ov6xx0_configure()
5867 if ((rc & 3) == 0) { in ov6xx0_configure()
5870 } else if ((rc & 3) == 1) { in ov6xx0_configure()
5873 } else if ((rc & 3) == 2) { in ov6xx0_configure()
5876 } else if ((rc & 3) == 3) { in ov6xx0_configure()
5910 int rc; in ks0127_configure() local
5923 rc = i2c_r(ov, 0x00); in ks0127_configure()
5924 if (rc < 0) { in ks0127_configure()
5927 } else if (rc & 0x08) { in ks0127_configure()
5928 rc = i2c_r(ov, 0x3d); in ks0127_configure()
5929 if (rc < 0) { in ks0127_configure()
5932 } else if ((rc & 0x0f) == 0) { in ks0127_configure()
5935 } else if ((rc & 0x0f) == 9) { in ks0127_configure()
5967 int rc; in saa7111a_configure() local
6039 rc = i2c_r(ov, 0x00); in saa7111a_configure()
6041 if (rc < 0) { in saa7111a_configure()
6045 info("Sensor is an SAA7111A (version 0x%x)", rc); in saa7111a_configure()