Lines Matching refs:otp_ptr
1067 struct ov5670_otp_info *otp_ptr = ov5670->otp; in ov5670_apply_otp() local
1088 if (otp_ptr->flag & 0x40) { in ov5670_apply_otp()
1089 rg = otp_ptr->rg_ratio; in ov5670_apply_otp()
1090 bg = otp_ptr->bg_ratio; in ov5670_apply_otp()
1611 struct ov5670_otp_info *otp_ptr; in ov5670_otp_read() local
1615 otp_ptr = devm_kzalloc(dev, sizeof(*otp_ptr), GFP_KERNEL); in ov5670_otp_read()
1616 if (!otp_ptr) in ov5670_otp_read()
1631 otp_ptr->flag = 0x80; /* valid info in OTP */ in ov5670_otp_read()
1632 ov5670_read_1byte(client, addr, &otp_ptr->module_id); in ov5670_otp_read()
1633 ov5670_read_1byte(client, addr + 1, &otp_ptr->lens_id); in ov5670_otp_read()
1634 ov5670_read_1byte(client, addr + 2, &otp_ptr->year); in ov5670_otp_read()
1635 ov5670_read_1byte(client, addr + 3, &otp_ptr->month); in ov5670_otp_read()
1636 ov5670_read_1byte(client, addr + 4, &otp_ptr->day); in ov5670_otp_read()
1638 otp_ptr->module_id, in ov5670_otp_read()
1639 otp_ptr->lens_id, in ov5670_otp_read()
1640 otp_ptr->year, in ov5670_otp_read()
1641 otp_ptr->month, in ov5670_otp_read()
1642 otp_ptr->day); in ov5670_otp_read()
1644 otp_ptr->flag = 0x00; /* not info in OTP */ in ov5670_otp_read()
1645 otp_ptr->module_id = 0x00; in ov5670_otp_read()
1646 otp_ptr->lens_id = 0x00; in ov5670_otp_read()
1647 otp_ptr->year = 0x00; in ov5670_otp_read()
1648 otp_ptr->month = 0x00; in ov5670_otp_read()
1649 otp_ptr->day = 0x00; in ov5670_otp_read()
1651 otp_ptr->module_id, in ov5670_otp_read()
1652 otp_ptr->lens_id, in ov5670_otp_read()
1653 otp_ptr->year, in ov5670_otp_read()
1654 otp_ptr->month, in ov5670_otp_read()
1655 otp_ptr->day); in ov5670_otp_read()
1670 otp_ptr->flag |= 0x40; /* valid info and AWB in OTP */ in ov5670_otp_read()
1672 ov5670_read_1byte(client, addr, &otp_ptr->rg_ratio); in ov5670_otp_read()
1673 otp_ptr->rg_ratio = (otp_ptr->rg_ratio << 2) + in ov5670_otp_read()
1675 ov5670_read_1byte(client, addr + 1, &otp_ptr->bg_ratio); in ov5670_otp_read()
1676 otp_ptr->bg_ratio = (otp_ptr->bg_ratio << 2) + in ov5670_otp_read()
1679 otp_ptr->rg_ratio, otp_ptr->bg_ratio); in ov5670_otp_read()
1681 otp_ptr->rg_ratio = 0x00; in ov5670_otp_read()
1682 otp_ptr->bg_ratio = 0x00; in ov5670_otp_read()
1684 otp_ptr->rg_ratio, otp_ptr->bg_ratio); in ov5670_otp_read()
1690 if (otp_ptr->flag) { in ov5670_otp_read()
1691 ov5670->otp = otp_ptr; in ov5670_otp_read()
1695 devm_kfree(dev, otp_ptr); in ov5670_otp_read()