Lines Matching refs:ret

245 	int ret = 0;  in set_i2c_page()  local
248 ret = i2c_smbus_write_byte_data(client, PAGEMODE_REG, page); in set_i2c_page()
249 if (!ret) in set_i2c_page()
252 return ret; in set_i2c_page()
259 int ret = set_i2c_page(info, client, reg_addr); in cam_i2c_read() local
261 if (ret) in cam_i2c_read()
262 return ret; in cam_i2c_read()
270 int ret = set_i2c_page(info, client, reg_addr); in cam_i2c_write() local
272 if (ret) in cam_i2c_write()
273 return ret; in cam_i2c_write()
281 int ret = cam_i2c_write(sd, msg->addr, msg->val); in noon010_bulk_write_reg() local
283 if (ret) in noon010_bulk_write_reg()
284 return ret; in noon010_bulk_write_reg()
295 int ret = 0; in noon010_power_ctrl() local
298 ret = cam_i2c_write(sd, POWER_CTRL_REG, reg | 0x02); in noon010_power_ctrl()
301 if (!ret) { in noon010_power_ctrl()
302 ret = cam_i2c_write(sd, POWER_CTRL_REG, reg); in noon010_power_ctrl()
303 if (reset && !ret) in noon010_power_ctrl()
306 return ret; in noon010_power_ctrl()
312 int ret; in noon010_enable_autowhitebalance() local
314 ret = cam_i2c_write(sd, AWB_CTL_REG(1), on ? 0x2E : 0x2F); in noon010_enable_autowhitebalance()
315 if (!ret) in noon010_enable_autowhitebalance()
316 ret = cam_i2c_write(sd, AWB_CTL_REG(0), on ? 0xFB : 0x7B); in noon010_enable_autowhitebalance()
317 return ret; in noon010_enable_autowhitebalance()
324 int reg, ret; in noon010_set_flip() local
336 ret = cam_i2c_write(sd, VDO_CTL_REG(1), reg | 0x80); in noon010_set_flip()
337 if (!ret) { in noon010_set_flip()
341 return ret; in noon010_set_flip()
349 int ret = cam_i2c_write(sd, VDO_CTL_REG(0), in noon010_set_params() local
351 if (ret) in noon010_set_params()
352 return ret; in noon010_set_params()
389 int ret; in power_enable() local
402 ret = regulator_bulk_enable(NOON010_NUM_SUPPLIES, info->supply); in power_enable()
403 if (ret) in power_enable()
404 return ret; in power_enable()
430 int ret; in power_disable() local
437 ret = regulator_bulk_disable(NOON010_NUM_SUPPLIES, info->supply); in power_disable()
438 if (ret) in power_disable()
439 return ret; in power_disable()
458 int ret = 0; in noon010_s_ctrl() local
474 ret = noon010_enable_autowhitebalance(sd, ctrl->val); in noon010_s_ctrl()
477 ret = cam_i2c_write(sd, MWB_BGAIN_REG, ctrl->val); in noon010_s_ctrl()
480 ret = cam_i2c_write(sd, MWB_RGAIN_REG, ctrl->val); in noon010_s_ctrl()
483 ret = -EINVAL; in noon010_s_ctrl()
487 return ret; in noon010_s_ctrl()
549 int ret = 0; in noon010_set_fmt() local
569 ret = -EBUSY; in noon010_set_fmt()
572 return ret; in noon010_set_fmt()
578 int ret = noon010_bulk_write_reg(sd, noon010_base_regs); in noon010_base_config() local
579 if (!ret) in noon010_base_config()
580 ret = noon010_set_params(sd); in noon010_base_config()
581 if (!ret) in noon010_base_config()
582 ret = noon010_set_flip(sd, 1, 0); in noon010_base_config()
584 return ret; in noon010_base_config()
590 int ret; in noon010_s_power() local
594 ret = power_enable(info); in noon010_s_power()
595 if (!ret) in noon010_s_power()
596 ret = noon010_base_config(sd); in noon010_s_power()
599 ret = power_disable(info); in noon010_s_power()
604 if (!ret && on) in noon010_s_power()
605 ret = v4l2_ctrl_handler_setup(&info->hdl); in noon010_s_power()
607 return ret; in noon010_s_power()
613 int ret = 0; in noon010_s_stream() local
617 ret = noon010_power_ctrl(sd, false, !on); in noon010_s_stream()
618 if (!ret) in noon010_s_stream()
621 if (!ret && on && info->apply_new_cfg) { in noon010_s_stream()
622 ret = noon010_set_params(sd); in noon010_s_stream()
623 if (!ret) in noon010_s_stream()
627 return ret; in noon010_s_stream()
682 int ret; in noon010_detect() local
684 ret = power_enable(info); in noon010_detect()
685 if (ret) in noon010_detect()
686 return ret; in noon010_detect()
688 ret = i2c_smbus_read_byte_data(client, DEVICE_ID_REG); in noon010_detect()
689 if (ret < 0) in noon010_detect()
690 dev_err(&client->dev, "I2C read failed: 0x%X\n", ret); in noon010_detect()
694 return ret == NOON010PC30_ID ? 0 : -ENODEV; in noon010_detect()
704 int ret; in noon010_probe() local
736 ret = info->hdl.error; in noon010_probe()
737 if (ret) in noon010_probe()
747 ret = devm_gpio_request_one(&client->dev, pdata->gpio_nreset, in noon010_probe()
750 if (ret) { in noon010_probe()
751 dev_err(&client->dev, "GPIO request error: %d\n", ret); in noon010_probe()
759 ret = devm_gpio_request_one(&client->dev, pdata->gpio_nstby, in noon010_probe()
762 if (ret) { in noon010_probe()
763 dev_err(&client->dev, "GPIO request error: %d\n", ret); in noon010_probe()
773 ret = devm_regulator_bulk_get(&client->dev, NOON010_NUM_SUPPLIES, in noon010_probe()
775 if (ret) in noon010_probe()
780 ret = media_entity_pads_init(&sd->entity, 1, &info->pad); in noon010_probe()
781 if (ret < 0) in noon010_probe()
784 ret = noon010_detect(client, info); in noon010_probe()
785 if (!ret) in noon010_probe()
791 return ret; in noon010_probe()