Lines Matching refs:gc8034

181 struct gc8034 {  struct
221 #define to_gc8034(sd) container_of(sd, struct gc8034, subdev) argument
1298 gc8034_find_best_fit(struct gc8034 *gc8034, in gc8034_find_best_fit() argument
1307 for (i = 0; i < gc8034->cfg_num; i++) { in gc8034_find_best_fit()
1322 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_set_fmt() local
1326 mutex_lock(&gc8034->mutex); in gc8034_set_fmt()
1328 mode = gc8034_find_best_fit(gc8034, fmt); in gc8034_set_fmt()
1337 mutex_unlock(&gc8034->mutex); in gc8034_set_fmt()
1341 gc8034->cur_mode = mode; in gc8034_set_fmt()
1343 __v4l2_ctrl_modify_range(gc8034->hblank, h_blank, in gc8034_set_fmt()
1346 __v4l2_ctrl_modify_range(gc8034->vblank, vblank_def, in gc8034_set_fmt()
1349 __v4l2_ctrl_s_ctrl(gc8034->vblank, vblank_def); in gc8034_set_fmt()
1350 __v4l2_ctrl_s_ctrl(gc8034->link_freq, mode->mipi_freq_idx); in gc8034_set_fmt()
1353 mutex_unlock(&gc8034->mutex); in gc8034_set_fmt()
1362 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_get_fmt() local
1363 const struct gc8034_mode *mode = gc8034->cur_mode; in gc8034_get_fmt()
1365 mutex_lock(&gc8034->mutex); in gc8034_get_fmt()
1370 mutex_unlock(&gc8034->mutex); in gc8034_get_fmt()
1379 mutex_unlock(&gc8034->mutex); in gc8034_get_fmt()
1399 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_enum_frame_sizes() local
1401 if (fse->index >= gc8034->cfg_num) in gc8034_enum_frame_sizes()
1418 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_g_frame_interval() local
1419 const struct gc8034_mode *mode = gc8034->cur_mode; in gc8034_g_frame_interval()
1563 static int gc8034_otp_enable(struct gc8034 *gc8034) in gc8034_otp_enable() argument
1565 struct i2c_client *client = gc8034->client; in gc8034_otp_enable()
1587 static int gc8034_otp_disable(struct gc8034 *gc8034) in gc8034_otp_disable() argument
1589 struct i2c_client *client = gc8034->client; in gc8034_otp_disable()
1608 static void gc8034_check_prsel(struct gc8034 *gc8034) in gc8034_check_prsel() argument
1610 struct i2c_client *client = gc8034->client; in gc8034_check_prsel()
1626 static int gc8034_otp_read(struct gc8034 *gc8034) in gc8034_otp_read() argument
1630 struct device *dev = &gc8034->client->dev; in gc8034_otp_read()
1631 struct i2c_client *client = gc8034->client; in gc8034_otp_read()
1959 gc8034->otp = otp_ptr; in gc8034_otp_read()
1961 gc8034->otp = NULL; in gc8034_otp_read()
2017 static void gc8034_get_module_inf(struct gc8034 *gc8034, in gc8034_get_module_inf() argument
2021 struct otp_info *otp = gc8034->otp; in gc8034_get_module_inf()
2023 struct gc8034_otp_info *otp = gc8034->otp; in gc8034_get_module_inf()
2030 gc8034->module_name, in gc8034_get_module_inf()
2033 gc8034->len_name, in gc8034_get_module_inf()
2039 static void gc8034_set_module_inf(struct gc8034 *gc8034, in gc8034_set_module_inf() argument
2042 mutex_lock(&gc8034->mutex); in gc8034_set_module_inf()
2043 memcpy(&gc8034->awb_cfg, cfg, sizeof(*cfg)); in gc8034_set_module_inf()
2044 mutex_unlock(&gc8034->mutex); in gc8034_set_module_inf()
2047 static int gc8034_get_channel_info(struct gc8034 *gc8034, struct rkmodule_channel_info *ch_info) in gc8034_get_channel_info() argument
2051 ch_info->vc = gc8034->cur_mode->vc[ch_info->index]; in gc8034_get_channel_info()
2052 ch_info->width = gc8034->cur_mode->width; in gc8034_get_channel_info()
2053 ch_info->height = gc8034->cur_mode->height; in gc8034_get_channel_info()
2060 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_ioctl() local
2067 gc8034_get_module_inf(gc8034, (struct rkmodule_inf *)arg); in gc8034_ioctl()
2070 gc8034_set_module_inf(gc8034, (struct rkmodule_awb_cfg *)arg); in gc8034_ioctl()
2077 ret = gc8034_write_reg(gc8034->client, in gc8034_ioctl()
2080 if (2 == gc8034->lane_num) { in gc8034_ioctl()
2081 ret |= gc8034_write_reg(gc8034->client, in gc8034_ioctl()
2085 ret |= gc8034_write_reg(gc8034->client, in gc8034_ioctl()
2090 ret = gc8034_write_reg(gc8034->client, in gc8034_ioctl()
2093 ret |= gc8034_write_reg(gc8034->client, in gc8034_ioctl()
2100 ret = gc8034_get_channel_info(gc8034, ch_info); in gc8034_ioctl()
2184 static int gc8034_apply_otp(struct gc8034 *gc8034) in gc8034_apply_otp() argument
2187 struct i2c_client *client = gc8034->client; in gc8034_apply_otp()
2188 struct gc8034_otp_info *otp_ptr = gc8034->otp; in gc8034_apply_otp()
2189 struct rkmodule_awb_cfg *awb_cfg = &gc8034->awb_cfg; in gc8034_apply_otp()
2201 if (!gc8034->awb_cfg.enable) in gc8034_apply_otp()
2365 static int __gc8034_start_stream(struct gc8034 *gc8034) in __gc8034_start_stream() argument
2369 if (gc8034->otp) { in __gc8034_start_stream()
2370 ret = gc8034_otp_enable(gc8034); in __gc8034_start_stream()
2371 gc8034_check_prsel(gc8034); in __gc8034_start_stream()
2372 ret |= gc8034_apply_otp(gc8034); in __gc8034_start_stream()
2374 ret |= gc8034_otp_disable(gc8034); in __gc8034_start_stream()
2379 ret = gc8034_write_array(gc8034->client, gc8034->cur_mode->reg_list); in __gc8034_start_stream()
2384 mutex_unlock(&gc8034->mutex); in __gc8034_start_stream()
2385 ret = v4l2_ctrl_handler_setup(&gc8034->ctrl_handler); in __gc8034_start_stream()
2386 mutex_lock(&gc8034->mutex); in __gc8034_start_stream()
2387 ret |= gc8034_write_reg(gc8034->client, in __gc8034_start_stream()
2390 if (2 == gc8034->lane_num) { in __gc8034_start_stream()
2391 ret |= gc8034_write_reg(gc8034->client, in __gc8034_start_stream()
2395 ret |= gc8034_write_reg(gc8034->client, in __gc8034_start_stream()
2402 static int __gc8034_stop_stream(struct gc8034 *gc8034) in __gc8034_stop_stream() argument
2406 ret = gc8034_write_reg(gc8034->client, in __gc8034_stop_stream()
2409 ret |= gc8034_write_reg(gc8034->client, in __gc8034_stop_stream()
2418 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_s_stream() local
2419 struct i2c_client *client = gc8034->client; in gc8034_s_stream()
2423 gc8034->cur_mode->width, in gc8034_s_stream()
2424 gc8034->cur_mode->height, in gc8034_s_stream()
2425 DIV_ROUND_CLOSEST(gc8034->cur_mode->max_fps.denominator, in gc8034_s_stream()
2426 gc8034->cur_mode->max_fps.numerator)); in gc8034_s_stream()
2428 mutex_lock(&gc8034->mutex); in gc8034_s_stream()
2430 if (on == gc8034->streaming) in gc8034_s_stream()
2440 ret = __gc8034_start_stream(gc8034); in gc8034_s_stream()
2447 __gc8034_stop_stream(gc8034); in gc8034_s_stream()
2451 gc8034->streaming = on; in gc8034_s_stream()
2454 mutex_unlock(&gc8034->mutex); in gc8034_s_stream()
2461 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_s_power() local
2462 struct i2c_client *client = gc8034->client; in gc8034_s_power()
2463 const struct gc8034_mode *mode = gc8034->cur_mode; in gc8034_s_power()
2467 mutex_lock(&gc8034->mutex); in gc8034_s_power()
2470 if (gc8034->power_on == !!on) in gc8034_s_power()
2480 ret = gc8034_write_array(gc8034->client, mode->global_reg_list); in gc8034_s_power()
2487 gc8034->power_on = true; in gc8034_s_power()
2490 gc8034->power_on = false; in gc8034_s_power()
2494 mutex_unlock(&gc8034->mutex); in gc8034_s_power()
2505 static int gc8034_enable_regulators(struct gc8034 *gc8034, in gc8034_enable_regulators() argument
2510 struct device *dev = &gc8034->client->dev; in gc8034_enable_regulators()
2530 static int __gc8034_power_on(struct gc8034 *gc8034) in __gc8034_power_on() argument
2534 struct device *dev = &gc8034->client->dev; in __gc8034_power_on()
2536 if (!IS_ERR(gc8034->power_gpio)) in __gc8034_power_on()
2537 gpiod_set_value_cansleep(gc8034->power_gpio, 1); in __gc8034_power_on()
2541 if (!IS_ERR_OR_NULL(gc8034->pins_default)) { in __gc8034_power_on()
2542 ret = pinctrl_select_state(gc8034->pinctrl, in __gc8034_power_on()
2543 gc8034->pins_default); in __gc8034_power_on()
2547 ret = clk_set_rate(gc8034->xvclk, GC8034_XVCLK_FREQ); in __gc8034_power_on()
2550 if (clk_get_rate(gc8034->xvclk) != GC8034_XVCLK_FREQ) in __gc8034_power_on()
2553 if (!IS_ERR(gc8034->reset_gpio)) in __gc8034_power_on()
2554 gpiod_set_value_cansleep(gc8034->reset_gpio, 1); in __gc8034_power_on()
2556 ret = gc8034_enable_regulators(gc8034, gc8034->supplies); in __gc8034_power_on()
2563 ret = clk_prepare_enable(gc8034->xvclk); in __gc8034_power_on()
2570 if (!IS_ERR(gc8034->pwdn_gpio)) in __gc8034_power_on()
2571 gpiod_set_value_cansleep(gc8034->pwdn_gpio, 0); in __gc8034_power_on()
2574 if (!IS_ERR(gc8034->reset_gpio)) in __gc8034_power_on()
2575 gpiod_set_value_cansleep(gc8034->reset_gpio, 0); in __gc8034_power_on()
2584 clk_disable_unprepare(gc8034->xvclk); in __gc8034_power_on()
2589 static void __gc8034_power_off(struct gc8034 *gc8034) in __gc8034_power_off() argument
2593 if (!IS_ERR(gc8034->pwdn_gpio)) in __gc8034_power_off()
2594 gpiod_set_value_cansleep(gc8034->pwdn_gpio, 1); in __gc8034_power_off()
2596 if (!IS_ERR(gc8034->reset_gpio)) in __gc8034_power_off()
2597 gpiod_set_value_cansleep(gc8034->reset_gpio, 1); in __gc8034_power_off()
2599 clk_disable_unprepare(gc8034->xvclk); in __gc8034_power_off()
2600 if (!IS_ERR_OR_NULL(gc8034->pins_sleep)) { in __gc8034_power_off()
2601 ret = pinctrl_select_state(gc8034->pinctrl, in __gc8034_power_off()
2602 gc8034->pins_sleep); in __gc8034_power_off()
2604 dev_dbg(&gc8034->client->dev, "could not set pins\n"); in __gc8034_power_off()
2606 if (!IS_ERR(gc8034->power_gpio)) in __gc8034_power_off()
2607 gpiod_set_value_cansleep(gc8034->power_gpio, 0); in __gc8034_power_off()
2609 regulator_bulk_disable(GC8034_NUM_SUPPLIES, gc8034->supplies); in __gc8034_power_off()
2616 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_runtime_resume() local
2618 return __gc8034_power_on(gc8034); in gc8034_runtime_resume()
2625 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_runtime_suspend() local
2627 __gc8034_power_off(gc8034); in gc8034_runtime_suspend()
2635 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_open() local
2640 mutex_lock(&gc8034->mutex); in gc8034_open()
2647 mutex_unlock(&gc8034->mutex); in gc8034_open()
2658 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_enum_frame_interval() local
2660 if (fie->index >= gc8034->cfg_num) in gc8034_enum_frame_interval()
2673 struct gc8034 *sensor = to_gc8034(sd); in gc8034_g_mbus_config()
2734 static int gc8034_set_exposure_reg(struct gc8034 *gc8034, u32 exposure) in gc8034_set_exposure_reg() argument
2742 gc8034->Dgain_ratio = 256 * exposure / cal_shutter; in gc8034_set_exposure_reg()
2743 ret = gc8034_write_reg(gc8034->client, in gc8034_set_exposure_reg()
2745 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_exposure_reg()
2748 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_exposure_reg()
2792 static int gc8034_set_gain_reg(struct gc8034 *gc8034, u32 a_gain) in gc8034_set_gain_reg() argument
2799 Dgain_ratio = gc8034->Dgain_ratio; in gc8034_set_gain_reg()
2802 ret = gc8034_write_reg(gc8034->client, in gc8034_set_gain_reg()
2804 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_gain_reg()
2808 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_gain_reg()
2810 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_gain_reg()
2813 ret |= gc8034_write_reg(gc8034->client, 0xfe, in gc8034_set_gain_reg()
2815 ret |= gc8034_write_reg(gc8034->client, 0x20, in gc8034_set_gain_reg()
2817 ret |= gc8034_write_reg(gc8034->client, 0x33, in gc8034_set_gain_reg()
2819 ret |= gc8034_write_reg(gc8034->client, 0xfe, in gc8034_set_gain_reg()
2821 ret |= gc8034_write_reg(gc8034->client, 0xdf, in gc8034_set_gain_reg()
2823 ret |= gc8034_write_reg(gc8034->client, 0xe7, in gc8034_set_gain_reg()
2825 ret |= gc8034_write_reg(gc8034->client, 0xe8, in gc8034_set_gain_reg()
2827 ret |= gc8034_write_reg(gc8034->client, 0xe9, in gc8034_set_gain_reg()
2829 ret |= gc8034_write_reg(gc8034->client, 0xea, in gc8034_set_gain_reg()
2831 ret |= gc8034_write_reg(gc8034->client, 0xeb, in gc8034_set_gain_reg()
2833 ret |= gc8034_write_reg(gc8034->client, 0xec, in gc8034_set_gain_reg()
2835 ret |= gc8034_write_reg(gc8034->client, 0xed, in gc8034_set_gain_reg()
2837 ret |= gc8034_write_reg(gc8034->client, 0xee, in gc8034_set_gain_reg()
2839 ret |= gc8034_write_reg(gc8034->client, 0xfe, in gc8034_set_gain_reg()
2849 struct gc8034 *gc8034 = container_of(ctrl->handler, in gc8034_set_ctrl() local
2850 struct gc8034, ctrl_handler); in gc8034_set_ctrl()
2851 struct i2c_client *client = gc8034->client; in gc8034_set_ctrl()
2860 max = gc8034->cur_mode->height + ctrl->val - 4; in gc8034_set_ctrl()
2861 __v4l2_ctrl_modify_range(gc8034->exposure, in gc8034_set_ctrl()
2862 gc8034->exposure->minimum, max, in gc8034_set_ctrl()
2863 gc8034->exposure->step, in gc8034_set_ctrl()
2864 gc8034->exposure->default_value); in gc8034_set_ctrl()
2875 ret = gc8034_set_exposure_reg(gc8034, ctrl->val); in gc8034_set_ctrl()
2879 ret = gc8034_set_gain_reg(gc8034, ctrl->val); in gc8034_set_ctrl()
2884 temp = ctrl->val + gc8034->cur_mode->height - 2448 - 36; in gc8034_set_ctrl()
2885 ret = gc8034_write_reg(gc8034->client, in gc8034_set_ctrl()
2888 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_ctrl()
2891 ret |= gc8034_write_reg(gc8034->client, in gc8034_set_ctrl()
2910 static int gc8034_initialize_controls(struct gc8034 *gc8034) in gc8034_initialize_controls() argument
2918 handler = &gc8034->ctrl_handler; in gc8034_initialize_controls()
2919 mode = gc8034->cur_mode; in gc8034_initialize_controls()
2923 handler->lock = &gc8034->mutex; in gc8034_initialize_controls()
2925 gc8034->link_freq = v4l2_ctrl_new_int_menu(handler, NULL, in gc8034_initialize_controls()
2929 v4l2_ctrl_s_ctrl(gc8034->link_freq, mode->mipi_freq_idx); in gc8034_initialize_controls()
2932 0, gc8034->pixel_rate, 1, gc8034->pixel_rate); in gc8034_initialize_controls()
2935 gc8034->hblank = v4l2_ctrl_new_std(handler, NULL, V4L2_CID_HBLANK, in gc8034_initialize_controls()
2937 if (gc8034->hblank) in gc8034_initialize_controls()
2938 gc8034->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; in gc8034_initialize_controls()
2941 gc8034->vblank = v4l2_ctrl_new_std(handler, &gc8034_ctrl_ops, in gc8034_initialize_controls()
2947 gc8034->exposure = v4l2_ctrl_new_std(handler, &gc8034_ctrl_ops, in gc8034_initialize_controls()
2952 gc8034->anal_gain = v4l2_ctrl_new_std(handler, &gc8034_ctrl_ops, in gc8034_initialize_controls()
2958 dev_err(&gc8034->client->dev, in gc8034_initialize_controls()
2963 gc8034->subdev.ctrl_handler = handler; in gc8034_initialize_controls()
2973 static int gc8034_check_sensor_id(struct gc8034 *gc8034, in gc8034_check_sensor_id() argument
2976 struct device *dev = &gc8034->client->dev; in gc8034_check_sensor_id()
2993 static int gc8034_configure_regulators(struct gc8034 *gc8034) in gc8034_configure_regulators() argument
2998 gc8034->supplies[i].supply = gc8034_supply_names[i]; in gc8034_configure_regulators()
3000 return devm_regulator_bulk_get(&gc8034->client->dev, in gc8034_configure_regulators()
3002 gc8034->supplies); in gc8034_configure_regulators()
3005 static int gc8034_parse_of(struct gc8034 *gc8034) in gc8034_parse_of() argument
3007 struct device *dev = &gc8034->client->dev; in gc8034_parse_of()
3025 gc8034->lane_num = rval; in gc8034_parse_of()
3026 if (4 == gc8034->lane_num) { in gc8034_parse_of()
3027 gc8034->cur_mode = &supported_modes_4lane[0]; in gc8034_parse_of()
3029 gc8034->cfg_num = ARRAY_SIZE(supported_modes_4lane); in gc8034_parse_of()
3031 fps = DIV_ROUND_CLOSEST(gc8034->cur_mode->max_fps.denominator, in gc8034_parse_of()
3032 gc8034->cur_mode->max_fps.numerator); in gc8034_parse_of()
3033 gc8034->pixel_rate = gc8034->cur_mode->vts_def * in gc8034_parse_of()
3034 gc8034->cur_mode->hts_def * fps; in gc8034_parse_of()
3037 gc8034->lane_num, gc8034->pixel_rate); in gc8034_parse_of()
3038 } else if (2 == gc8034->lane_num) { in gc8034_parse_of()
3039 gc8034->cur_mode = &supported_modes_2lane[0]; in gc8034_parse_of()
3041 gc8034->cfg_num = ARRAY_SIZE(supported_modes_2lane); in gc8034_parse_of()
3043 fps = DIV_ROUND_CLOSEST(gc8034->cur_mode->max_fps.denominator, in gc8034_parse_of()
3044 gc8034->cur_mode->max_fps.numerator); in gc8034_parse_of()
3045 gc8034->pixel_rate = gc8034->cur_mode->vts_def * in gc8034_parse_of()
3046 gc8034->cur_mode->hts_def * fps; in gc8034_parse_of()
3048 gc8034->lane_num, gc8034->pixel_rate); in gc8034_parse_of()
3050 dev_err(dev, "unsupported lane_num(%d)\n", gc8034->lane_num); in gc8034_parse_of()
3062 struct gc8034 *gc8034; in gc8034_probe() local
3076 gc8034 = devm_kzalloc(dev, sizeof(*gc8034), GFP_KERNEL); in gc8034_probe()
3077 if (!gc8034) in gc8034_probe()
3081 &gc8034->module_index); in gc8034_probe()
3083 &gc8034->module_facing); in gc8034_probe()
3085 &gc8034->module_name); in gc8034_probe()
3087 &gc8034->len_name); in gc8034_probe()
3092 gc8034->client = client; in gc8034_probe()
3094 gc8034->xvclk = devm_clk_get(dev, "xvclk"); in gc8034_probe()
3095 if (IS_ERR(gc8034->xvclk)) { in gc8034_probe()
3100 gc8034->power_gpio = devm_gpiod_get(dev, "power", GPIOD_OUT_LOW); in gc8034_probe()
3101 if (IS_ERR(gc8034->power_gpio)) in gc8034_probe()
3103 gc8034->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); in gc8034_probe()
3104 if (IS_ERR(gc8034->reset_gpio)) in gc8034_probe()
3107 gc8034->pwdn_gpio = devm_gpiod_get(dev, "pwdn", GPIOD_OUT_LOW); in gc8034_probe()
3108 if (IS_ERR(gc8034->pwdn_gpio)) in gc8034_probe()
3111 ret = gc8034_configure_regulators(gc8034); in gc8034_probe()
3117 ret = gc8034_parse_of(gc8034); in gc8034_probe()
3121 gc8034->pinctrl = devm_pinctrl_get(dev); in gc8034_probe()
3122 if (!IS_ERR(gc8034->pinctrl)) { in gc8034_probe()
3123 gc8034->pins_default = in gc8034_probe()
3124 pinctrl_lookup_state(gc8034->pinctrl, in gc8034_probe()
3126 if (IS_ERR(gc8034->pins_default)) in gc8034_probe()
3129 gc8034->pins_sleep = in gc8034_probe()
3130 pinctrl_lookup_state(gc8034->pinctrl, in gc8034_probe()
3132 if (IS_ERR(gc8034->pins_sleep)) in gc8034_probe()
3136 mutex_init(&gc8034->mutex); in gc8034_probe()
3138 sd = &gc8034->subdev; in gc8034_probe()
3140 ret = gc8034_initialize_controls(gc8034); in gc8034_probe()
3144 ret = __gc8034_power_on(gc8034); in gc8034_probe()
3148 ret = gc8034_check_sensor_id(gc8034, client); in gc8034_probe()
3171 gc8034->otp = otp_ptr; in gc8034_probe()
3173 gc8034->otp = NULL; in gc8034_probe()
3181 gc8034_otp_enable(gc8034); in gc8034_probe()
3182 gc8034_otp_read(gc8034); in gc8034_probe()
3183 gc8034_otp_disable(gc8034); in gc8034_probe()
3192 gc8034->pad.flags = MEDIA_PAD_FL_SOURCE; in gc8034_probe()
3194 ret = media_entity_pads_init(&sd->entity, 1, &gc8034->pad); in gc8034_probe()
3200 if (strcmp(gc8034->module_facing, "back") == 0) in gc8034_probe()
3206 gc8034->module_index, facing, in gc8034_probe()
3225 __gc8034_power_off(gc8034); in gc8034_probe()
3227 v4l2_ctrl_handler_free(&gc8034->ctrl_handler); in gc8034_probe()
3229 mutex_destroy(&gc8034->mutex); in gc8034_probe()
3237 struct gc8034 *gc8034 = to_gc8034(sd); in gc8034_remove() local
3243 v4l2_ctrl_handler_free(&gc8034->ctrl_handler); in gc8034_remove()
3244 mutex_destroy(&gc8034->mutex); in gc8034_remove()
3248 __gc8034_power_off(gc8034); in gc8034_remove()