Lines Matching refs:gc4023
115 struct gc4023 { struct
156 #define to_gc4023(sd) container_of(sd, struct gc4023, subdev) argument
491 gc4023_find_best_fit(struct gc4023 *gc4023, struct v4l2_subdev_format *fmt) in gc4023_find_best_fit() argument
499 for (i = 0; i < gc4023->cfg_num; i++) { in gc4023_find_best_fit()
514 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_set_fmt() local
518 mutex_lock(&gc4023->mutex); in gc4023_set_fmt()
520 mode = gc4023_find_best_fit(gc4023, fmt); in gc4023_set_fmt()
529 mutex_unlock(&gc4023->mutex); in gc4023_set_fmt()
533 gc4023->cur_mode = mode; in gc4023_set_fmt()
535 __v4l2_ctrl_modify_range(gc4023->hblank, h_blank, in gc4023_set_fmt()
538 __v4l2_ctrl_modify_range(gc4023->vblank, vblank_def, in gc4023_set_fmt()
542 gc4023->cur_link_freq = 0; in gc4023_set_fmt()
543 gc4023->cur_pixel_rate = GC4023_PIXEL_RATE_LINEAR; in gc4023_set_fmt()
545 __v4l2_ctrl_s_ctrl_int64(gc4023->pixel_rate, in gc4023_set_fmt()
546 gc4023->cur_pixel_rate); in gc4023_set_fmt()
547 __v4l2_ctrl_s_ctrl(gc4023->link_freq, in gc4023_set_fmt()
548 gc4023->cur_link_freq); in gc4023_set_fmt()
549 gc4023->cur_vts = mode->vts_def; in gc4023_set_fmt()
551 mutex_unlock(&gc4023->mutex); in gc4023_set_fmt()
560 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_get_fmt() local
561 const struct gc4023_mode *mode = gc4023->cur_mode; in gc4023_get_fmt()
563 mutex_lock(&gc4023->mutex); in gc4023_get_fmt()
568 mutex_unlock(&gc4023->mutex); in gc4023_get_fmt()
577 mutex_unlock(&gc4023->mutex); in gc4023_get_fmt()
586 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_enum_mbus_code() local
590 code->code = gc4023->cur_mode->bus_fmt; in gc4023_enum_mbus_code()
599 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_enum_frame_sizes() local
601 if (fse->index >= gc4023->cfg_num) in gc4023_enum_frame_sizes()
615 static int gc4023_enable_test_pattern(struct gc4023 *gc4023, u32 pattern) in gc4023_enable_test_pattern() argument
624 return gc4023_write_reg(gc4023->client, GC4023_REG_TEST_PATTERN, in gc4023_enable_test_pattern()
628 static int gc4023_set_gain_reg(struct gc4023 *gc4023, u32 gain) in gc4023_set_gain_reg() argument
644 gc4023_write_reg(gc4023->client, 0x614, in gc4023_set_gain_reg()
646 gc4023_write_reg(gc4023->client, 0x615, in gc4023_set_gain_reg()
648 gc4023_write_reg(gc4023->client, 0x218, in gc4023_set_gain_reg()
650 gc4023_write_reg(gc4023->client, 0x1467, in gc4023_set_gain_reg()
652 gc4023_write_reg(gc4023->client, 0x1468, in gc4023_set_gain_reg()
654 gc4023_write_reg(gc4023->client, 0xb8, in gc4023_set_gain_reg()
656 gc4023_write_reg(gc4023->client, 0xb9, in gc4023_set_gain_reg()
660 gc4023_write_reg(gc4023->client, 0x64, in gc4023_set_gain_reg()
662 gc4023_write_reg(gc4023->client, 0x65, in gc4023_set_gain_reg()
667 static int gc4023_set_mirror_flip(struct gc4023 *gc4023, u8 val, u8 otp_val) in gc4023_set_mirror_flip() argument
671 ret = gc4023_write_reg(gc4023->client, 0x022c, in gc4023_set_mirror_flip()
673 ret |= gc4023_write_reg(gc4023->client, 0x0a67, in gc4023_set_mirror_flip()
675 ret |= gc4023_write_reg(gc4023->client, 0x0a54, in gc4023_set_mirror_flip()
677 ret |= gc4023_write_reg(gc4023->client, 0x0a65, in gc4023_set_mirror_flip()
679 ret |= gc4023_write_reg(gc4023->client, 0x0a98, in gc4023_set_mirror_flip()
681 ret |= gc4023_write_reg(gc4023->client, 0x05be, in gc4023_set_mirror_flip()
683 ret |= gc4023_write_reg(gc4023->client, 0x05a9, in gc4023_set_mirror_flip()
685 ret |= gc4023_write_reg(gc4023->client, 0x0029, in gc4023_set_mirror_flip()
687 ret |= gc4023_write_reg(gc4023->client, 0x002b, in gc4023_set_mirror_flip()
689 ret |= gc4023_write_reg(gc4023->client, 0x0a83, in gc4023_set_mirror_flip()
691 ret |= gc4023_write_reg(gc4023->client, 0x0a72, in gc4023_set_mirror_flip()
693 ret |= gc4023_write_reg(gc4023->client, 0x0a73, in gc4023_set_mirror_flip()
695 ret |= gc4023_write_reg(gc4023->client, 0x0a75, in gc4023_set_mirror_flip()
697 ret |= gc4023_write_reg(gc4023->client, 0x0a70, in gc4023_set_mirror_flip()
699 ret |= gc4023_write_reg(gc4023->client, 0x0a5a, in gc4023_set_mirror_flip()
704 ret |= gc4023_write_reg(gc4023->client, 0x05be, in gc4023_set_mirror_flip()
706 ret |= gc4023_write_reg(gc4023->client, 0x0a70, in gc4023_set_mirror_flip()
708 ret |= gc4023_write_reg(gc4023->client, 0x0080, in gc4023_set_mirror_flip()
710 ret |= gc4023_write_reg(gc4023->client, 0x0a67, in gc4023_set_mirror_flip()
720 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_g_frame_interval() local
721 const struct gc4023_mode *mode = gc4023->cur_mode; in gc4023_g_frame_interval()
731 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_g_mbus_config() local
732 const struct gc4023_mode *mode = gc4023->cur_mode; in gc4023_g_mbus_config()
751 static void gc4023_get_module_inf(struct gc4023 *gc4023, in gc4023_get_module_inf() argument
756 strscpy(inf->base.module, gc4023->module_name, in gc4023_get_module_inf()
758 strscpy(inf->base.lens, gc4023->len_name, sizeof(inf->base.lens)); in gc4023_get_module_inf()
761 static int gc4023_get_channel_info(struct gc4023 *gc4023, struct rkmodule_channel_info *ch_info) in gc4023_get_channel_info() argument
765 ch_info->vc = gc4023->cur_mode->vc[ch_info->index]; in gc4023_get_channel_info()
766 ch_info->width = gc4023->cur_mode->width; in gc4023_get_channel_info()
767 ch_info->height = gc4023->cur_mode->height; in gc4023_get_channel_info()
768 ch_info->bus_fmt = gc4023->cur_mode->bus_fmt; in gc4023_get_channel_info()
774 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_ioctl() local
783 gc4023_get_module_inf(gc4023, (struct rkmodule_inf *)arg); in gc4023_ioctl()
788 hdr->hdr_mode = gc4023->cur_mode->hdr_mode; in gc4023_ioctl()
792 w = gc4023->cur_mode->width; in gc4023_ioctl()
793 h = gc4023->cur_mode->height; in gc4023_ioctl()
794 for (i = 0; i < gc4023->cfg_num; i++) { in gc4023_ioctl()
798 gc4023->cur_mode = &supported_modes[i]; in gc4023_ioctl()
802 if (i == gc4023->cfg_num) { in gc4023_ioctl()
803 dev_err(&gc4023->client->dev, in gc4023_ioctl()
808 w = gc4023->cur_mode->hts_def - in gc4023_ioctl()
809 gc4023->cur_mode->width; in gc4023_ioctl()
810 h = gc4023->cur_mode->vts_def - in gc4023_ioctl()
811 gc4023->cur_mode->height; in gc4023_ioctl()
812 __v4l2_ctrl_modify_range(gc4023->hblank, w, w, 1, w); in gc4023_ioctl()
813 __v4l2_ctrl_modify_range(gc4023->vblank, h, in gc4023_ioctl()
815 gc4023->cur_mode->height, in gc4023_ioctl()
818 gc4023->cur_link_freq = 0; in gc4023_ioctl()
819 gc4023->cur_pixel_rate = GC4023_PIXEL_RATE_LINEAR; in gc4023_ioctl()
821 __v4l2_ctrl_s_ctrl_int64(gc4023->pixel_rate, in gc4023_ioctl()
822 gc4023->cur_pixel_rate); in gc4023_ioctl()
823 __v4l2_ctrl_s_ctrl(gc4023->link_freq, in gc4023_ioctl()
824 gc4023->cur_link_freq); in gc4023_ioctl()
825 gc4023->cur_vts = gc4023->cur_mode->vts_def; in gc4023_ioctl()
831 ret = gc4023_write_reg(gc4023->client, GC4023_REG_CTRL_MODE, in gc4023_ioctl()
834 ret = gc4023_write_reg(gc4023->client, GC4023_REG_CTRL_MODE, in gc4023_ioctl()
839 ret = gc4023_get_channel_info(gc4023, ch_info); in gc4023_ioctl()
936 static int __gc4023_start_stream(struct gc4023 *gc4023) in __gc4023_start_stream() argument
940 ret = gc4023_write_array(gc4023->client, gc4023->cur_mode->reg_list); in __gc4023_start_stream()
945 ret = __v4l2_ctrl_handler_setup(&gc4023->ctrl_handler); in __gc4023_start_stream()
946 if (gc4023->has_init_exp && gc4023->cur_mode->hdr_mode != NO_HDR) { in __gc4023_start_stream()
947 ret = gc4023_ioctl(&gc4023->subdev, PREISP_CMD_SET_HDRAE_EXP, in __gc4023_start_stream()
948 &gc4023->init_hdrae_exp); in __gc4023_start_stream()
950 dev_err(&gc4023->client->dev, in __gc4023_start_stream()
958 ret |= gc4023_write_reg(gc4023->client, GC4023_REG_CTRL_MODE, in __gc4023_start_stream()
964 static int __gc4023_stop_stream(struct gc4023 *gc4023) in __gc4023_stop_stream() argument
966 gc4023->has_init_exp = false; in __gc4023_stop_stream()
967 return gc4023_write_reg(gc4023->client, GC4023_REG_CTRL_MODE, in __gc4023_stop_stream()
973 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_s_stream() local
974 struct i2c_client *client = gc4023->client; in gc4023_s_stream()
977 mutex_lock(&gc4023->mutex); in gc4023_s_stream()
979 if (on == gc4023->streaming) in gc4023_s_stream()
989 ret = __gc4023_start_stream(gc4023); in gc4023_s_stream()
996 __gc4023_stop_stream(gc4023); in gc4023_s_stream()
1000 gc4023->streaming = on; in gc4023_s_stream()
1003 mutex_unlock(&gc4023->mutex); in gc4023_s_stream()
1010 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_s_power() local
1011 struct i2c_client *client = gc4023->client; in gc4023_s_power()
1014 mutex_lock(&gc4023->mutex); in gc4023_s_power()
1017 if (gc4023->power_on == !!on) in gc4023_s_power()
1027 ret = gc4023_write_array(gc4023->client, gc4023_global_regs); in gc4023_s_power()
1034 gc4023->power_on = true; in gc4023_s_power()
1037 gc4023->power_on = false; in gc4023_s_power()
1041 mutex_unlock(&gc4023->mutex); in gc4023_s_power()
1052 static int __gc4023_power_on(struct gc4023 *gc4023) in __gc4023_power_on() argument
1056 struct device *dev = &gc4023->client->dev; in __gc4023_power_on()
1058 if (!IS_ERR_OR_NULL(gc4023->pins_default)) { in __gc4023_power_on()
1059 ret = pinctrl_select_state(gc4023->pinctrl, in __gc4023_power_on()
1060 gc4023->pins_default); in __gc4023_power_on()
1064 ret = clk_set_rate(gc4023->xvclk, GC4023_XVCLK_FREQ); in __gc4023_power_on()
1067 if (clk_get_rate(gc4023->xvclk) != GC4023_XVCLK_FREQ) in __gc4023_power_on()
1069 ret = clk_prepare_enable(gc4023->xvclk); in __gc4023_power_on()
1074 if (!IS_ERR(gc4023->reset_gpio)) in __gc4023_power_on()
1075 gpiod_set_value_cansleep(gc4023->reset_gpio, 0); in __gc4023_power_on()
1077 if (!IS_ERR(gc4023->pwdn_gpio)) in __gc4023_power_on()
1078 gpiod_set_value_cansleep(gc4023->pwdn_gpio, 0); in __gc4023_power_on()
1081 ret = regulator_bulk_enable(GC4023_NUM_SUPPLIES, gc4023->supplies); in __gc4023_power_on()
1088 if (!IS_ERR(gc4023->pwren_gpio)) in __gc4023_power_on()
1089 gpiod_set_value_cansleep(gc4023->pwren_gpio, 1); in __gc4023_power_on()
1092 if (!IS_ERR(gc4023->pwdn_gpio)) in __gc4023_power_on()
1093 gpiod_set_value_cansleep(gc4023->pwdn_gpio, 1); in __gc4023_power_on()
1095 if (!IS_ERR(gc4023->reset_gpio)) in __gc4023_power_on()
1096 gpiod_set_value_cansleep(gc4023->reset_gpio, 1); in __gc4023_power_on()
1105 clk_disable_unprepare(gc4023->xvclk); in __gc4023_power_on()
1110 static void __gc4023_power_off(struct gc4023 *gc4023) in __gc4023_power_off() argument
1113 struct device *dev = &gc4023->client->dev; in __gc4023_power_off()
1115 if (!IS_ERR(gc4023->pwdn_gpio)) in __gc4023_power_off()
1116 gpiod_set_value_cansleep(gc4023->pwdn_gpio, 0); in __gc4023_power_off()
1117 clk_disable_unprepare(gc4023->xvclk); in __gc4023_power_off()
1118 if (!IS_ERR(gc4023->reset_gpio)) in __gc4023_power_off()
1119 gpiod_set_value_cansleep(gc4023->reset_gpio, 0); in __gc4023_power_off()
1120 if (!IS_ERR_OR_NULL(gc4023->pins_sleep)) { in __gc4023_power_off()
1121 ret = pinctrl_select_state(gc4023->pinctrl, in __gc4023_power_off()
1122 gc4023->pins_sleep); in __gc4023_power_off()
1126 regulator_bulk_disable(GC4023_NUM_SUPPLIES, gc4023->supplies); in __gc4023_power_off()
1127 if (!IS_ERR(gc4023->pwren_gpio)) in __gc4023_power_off()
1128 gpiod_set_value_cansleep(gc4023->pwren_gpio, 0); in __gc4023_power_off()
1135 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_runtime_resume() local
1137 return __gc4023_power_on(gc4023); in gc4023_runtime_resume()
1144 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_runtime_suspend() local
1146 __gc4023_power_off(gc4023); in gc4023_runtime_suspend()
1154 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_open() local
1159 mutex_lock(&gc4023->mutex); in gc4023_open()
1166 mutex_unlock(&gc4023->mutex); in gc4023_open()
1177 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_enum_frame_interval() local
1179 if (fie->index >= gc4023->cfg_num) in gc4023_enum_frame_interval()
1208 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_get_selection() local
1211 sel->r.left = CROP_START(gc4023->cur_mode->width, DST_WIDTH); in gc4023_get_selection()
1213 sel->r.top = CROP_START(gc4023->cur_mode->height, DST_HEIGHT); in gc4023_get_selection()
1262 struct gc4023 *gc4023 = container_of(ctrl->handler, in gc4023_set_ctrl() local
1263 struct gc4023, ctrl_handler); in gc4023_set_ctrl()
1264 struct i2c_client *client = gc4023->client; in gc4023_set_ctrl()
1274 max = gc4023->cur_mode->height + ctrl->val - 4; in gc4023_set_ctrl()
1275 __v4l2_ctrl_modify_range(gc4023->exposure, in gc4023_set_ctrl()
1276 gc4023->exposure->minimum, in gc4023_set_ctrl()
1278 gc4023->exposure->step, in gc4023_set_ctrl()
1279 gc4023->exposure->default_value); in gc4023_set_ctrl()
1289 ret = gc4023_write_reg(gc4023->client, GC4023_REG_EXPOSURE_H, in gc4023_set_ctrl()
1292 ret |= gc4023_write_reg(gc4023->client, GC4023_REG_EXPOSURE_L, in gc4023_set_ctrl()
1297 ret = gc4023_set_gain_reg(gc4023, ctrl->val); in gc4023_set_ctrl()
1300 gc4023->cur_vts = ctrl->val + gc4023->cur_mode->height; in gc4023_set_ctrl()
1301 ret = gc4023_write_reg(gc4023->client, GC4023_REG_VTS_H, in gc4023_set_ctrl()
1303 gc4023->cur_vts >> 8); in gc4023_set_ctrl()
1304 ret |= gc4023_write_reg(gc4023->client, GC4023_REG_VTS_L, in gc4023_set_ctrl()
1306 gc4023->cur_vts & 0xff); in gc4023_set_ctrl()
1309 ret = gc4023_enable_test_pattern(gc4023, ctrl->val); in gc4023_set_ctrl()
1312 ret = gc4023_read_reg(gc4023->client, GC4023_MIRROR_FLIP_REG, in gc4023_set_ctrl()
1314 ret |= gc4023_read_reg(gc4023->client, GC4023_OTP_MIRROR_FLIP_REG, in gc4023_set_ctrl()
1323 ret |= gc4023_set_mirror_flip(gc4023, mirror, otp_mirror); in gc4023_set_ctrl()
1326 ret = gc4023_read_reg(gc4023->client, GC4023_MIRROR_FLIP_REG, in gc4023_set_ctrl()
1328 ret |= gc4023_read_reg(gc4023->client, GC4023_OTP_MIRROR_FLIP_REG, in gc4023_set_ctrl()
1337 ret |= gc4023_set_mirror_flip(gc4023, flip, otp_flip); in gc4023_set_ctrl()
1354 static int gc4023_initialize_controls(struct gc4023 *gc4023) in gc4023_initialize_controls() argument
1362 handler = &gc4023->ctrl_handler; in gc4023_initialize_controls()
1363 mode = gc4023->cur_mode; in gc4023_initialize_controls()
1367 handler->lock = &gc4023->mutex; in gc4023_initialize_controls()
1369 gc4023->link_freq = v4l2_ctrl_new_int_menu(handler, NULL, V4L2_CID_LINK_FREQ, in gc4023_initialize_controls()
1372 gc4023->cur_link_freq = 0; in gc4023_initialize_controls()
1373 gc4023->cur_pixel_rate = GC4023_PIXEL_RATE_LINEAR; in gc4023_initialize_controls()
1376 __v4l2_ctrl_s_ctrl(gc4023->link_freq, in gc4023_initialize_controls()
1377 gc4023->cur_link_freq); in gc4023_initialize_controls()
1379 gc4023->pixel_rate = v4l2_ctrl_new_std(handler, NULL, V4L2_CID_PIXEL_RATE, in gc4023_initialize_controls()
1383 gc4023->hblank = v4l2_ctrl_new_std(handler, NULL, V4L2_CID_HBLANK, in gc4023_initialize_controls()
1385 if (gc4023->hblank) in gc4023_initialize_controls()
1386 gc4023->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; in gc4023_initialize_controls()
1389 gc4023->cur_vts = mode->vts_def; in gc4023_initialize_controls()
1390 gc4023->vblank = v4l2_ctrl_new_std(handler, &gc4023_ctrl_ops, in gc4023_initialize_controls()
1396 gc4023->exposure = v4l2_ctrl_new_std(handler, &gc4023_ctrl_ops, in gc4023_initialize_controls()
1403 gc4023->anal_gain = v4l2_ctrl_new_std(handler, &gc4023_ctrl_ops, in gc4023_initialize_controls()
1410 gc4023->test_pattern = in gc4023_initialize_controls()
1417 gc4023->h_flip = v4l2_ctrl_new_std(handler, &gc4023_ctrl_ops, in gc4023_initialize_controls()
1420 gc4023->v_flip = v4l2_ctrl_new_std(handler, &gc4023_ctrl_ops, in gc4023_initialize_controls()
1424 dev_err(&gc4023->client->dev, in gc4023_initialize_controls()
1429 gc4023->subdev.ctrl_handler = handler; in gc4023_initialize_controls()
1430 gc4023->has_init_exp = false; in gc4023_initialize_controls()
1440 static int gc4023_check_sensor_id(struct gc4023 *gc4023, in gc4023_check_sensor_id() argument
1443 struct device *dev = &gc4023->client->dev; in gc4023_check_sensor_id()
1463 static int gc4023_configure_regulators(struct gc4023 *gc4023) in gc4023_configure_regulators() argument
1468 gc4023->supplies[i].supply = gc4023_supply_names[i]; in gc4023_configure_regulators()
1470 return devm_regulator_bulk_get(&gc4023->client->dev, in gc4023_configure_regulators()
1472 gc4023->supplies); in gc4023_configure_regulators()
1480 struct gc4023 *gc4023; in gc4023_probe() local
1491 gc4023 = devm_kzalloc(dev, sizeof(*gc4023), GFP_KERNEL); in gc4023_probe()
1492 if (!gc4023) in gc4023_probe()
1497 &gc4023->module_index); in gc4023_probe()
1499 &gc4023->module_facing); in gc4023_probe()
1501 &gc4023->module_name); in gc4023_probe()
1503 &gc4023->len_name); in gc4023_probe()
1509 gc4023->client = client; in gc4023_probe()
1510 gc4023->cfg_num = ARRAY_SIZE(supported_modes); in gc4023_probe()
1511 for (i = 0; i < gc4023->cfg_num; i++) { in gc4023_probe()
1513 gc4023->cur_mode = &supported_modes[i]; in gc4023_probe()
1517 if (i == gc4023->cfg_num) in gc4023_probe()
1518 gc4023->cur_mode = &supported_modes[0]; in gc4023_probe()
1520 gc4023->xvclk = devm_clk_get(dev, "xvclk"); in gc4023_probe()
1521 if (IS_ERR(gc4023->xvclk)) { in gc4023_probe()
1526 gc4023->pwren_gpio = devm_gpiod_get(dev, "pwren", GPIOD_OUT_LOW); in gc4023_probe()
1527 if (IS_ERR(gc4023->pwren_gpio)) in gc4023_probe()
1530 gc4023->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in gc4023_probe()
1531 if (IS_ERR(gc4023->reset_gpio)) in gc4023_probe()
1534 gc4023->pwdn_gpio = devm_gpiod_get(dev, "pwdn", GPIOD_OUT_LOW); in gc4023_probe()
1535 if (IS_ERR(gc4023->pwdn_gpio)) in gc4023_probe()
1538 gc4023->pinctrl = devm_pinctrl_get(dev); in gc4023_probe()
1539 if (!IS_ERR(gc4023->pinctrl)) { in gc4023_probe()
1540 gc4023->pins_default = in gc4023_probe()
1541 pinctrl_lookup_state(gc4023->pinctrl, in gc4023_probe()
1543 if (IS_ERR(gc4023->pins_default)) in gc4023_probe()
1546 gc4023->pins_sleep = in gc4023_probe()
1547 pinctrl_lookup_state(gc4023->pinctrl, in gc4023_probe()
1549 if (IS_ERR(gc4023->pins_sleep)) in gc4023_probe()
1555 ret = gc4023_configure_regulators(gc4023); in gc4023_probe()
1561 mutex_init(&gc4023->mutex); in gc4023_probe()
1563 sd = &gc4023->subdev; in gc4023_probe()
1565 ret = gc4023_initialize_controls(gc4023); in gc4023_probe()
1569 ret = __gc4023_power_on(gc4023); in gc4023_probe()
1575 ret = gc4023_check_sensor_id(gc4023, client); in gc4023_probe()
1585 gc4023->pad.flags = MEDIA_PAD_FL_SOURCE; in gc4023_probe()
1587 ret = media_entity_pads_init(&sd->entity, 1, &gc4023->pad); in gc4023_probe()
1593 if (strcmp(gc4023->module_facing, "back") == 0) in gc4023_probe()
1599 gc4023->module_index, facing, in gc4023_probe()
1618 __gc4023_power_off(gc4023); in gc4023_probe()
1620 v4l2_ctrl_handler_free(&gc4023->ctrl_handler); in gc4023_probe()
1622 mutex_destroy(&gc4023->mutex); in gc4023_probe()
1630 struct gc4023 *gc4023 = to_gc4023(sd); in gc4023_remove() local
1636 v4l2_ctrl_handler_free(&gc4023->ctrl_handler); in gc4023_remove()
1637 mutex_destroy(&gc4023->mutex); in gc4023_remove()
1641 __gc4023_power_off(gc4023); in gc4023_remove()