Lines Matching +full:vdd2 +full:- +full:supply
1 // SPDX-License-Identifier: GPL-2.0
13 * Copyright (C) 2019-2020 Raspberry Pi (Trading) Ltd
32 #include <media/v4l2-cci.h>
33 #include <media/v4l2-ctrls.h>
34 #include <media/v4l2-device.h>
35 #include <media/v4l2-event.h>
36 #include <media/v4l2-fwnode.h>
37 #include <media/v4l2-mediabus.h>
94 #define IMX283_HMAX_MAX (BIT(16) - 1)
98 #define IMX283_VMAX_MAX (BIT(16) - 1)
106 * Gain [dB] = -20log{(2048 - value [10:0]) /2048}
213 * Minimum horizontal timing in pixel-units
226 /* minimum V-timing in lines */
229 /* default H-timing */
232 /* default V-timing */
239 * Per-mode vertical crop constants used to calculate values
334 /* Horizontal / Vertical 2/2-line binning */
338 /* Horizontal / Vertical 3/3-line binning */
543 "vadd", /* Analog (2.9V) supply */
544 "vdd1", /* Supply Voltage 2 (1.8V) supply */
545 "vdd2", /* Supply Voltage 3 (1.2V) supply */
611 u64 link_frequency = link_frequencies[__ffs(imx283->link_freq_bitmap)]; in imx283_pixel_rate()
612 unsigned int bpp = mode->bpp; in imx283_pixel_rate()
630 * can easily overflow this calculation, so pre-divide to simplify. in imx283_internal_clock()
649 * can easily overflow this calculation, so pre-divide to simplify. in imx283_iclk_to_pix()
669 offset = mode->mode == IMX283_MODE_0 ? 209 : 157; in imx283_exposure()
670 numerator = (imx283->vmax * (svr + 1) - shr) * imx283->hmax + offset; in imx283_exposure()
672 do_div(numerator, imx283->hmax); in imx283_exposure()
682 u64 min_shr = mode->min_shr; in imx283_exposure_limits()
684 u64 max_shr = (svr + 1) * imx283->vmax - 4; in imx283_exposure_limits()
686 max_shr = min(max_shr, BIT(16) - 1); in imx283_exposure_limits()
704 offset = mode->mode == IMX283_MODE_0 ? 209 : 157; in imx283_shr()
705 temp = ((u64)exposure * imx283->hmax - offset); in imx283_shr()
706 do_div(temp, imx283->hmax); in imx283_shr()
708 return (imx283->vmax * (svr + 1) - temp); in imx283_shr()
736 return -EINVAL; in imx283_update_test_pattern()
739 return cci_write(imx283->cci, IMX283_REG_TPG_CTRL, 0x00, NULL); in imx283_update_test_pattern()
741 ret = cci_write(imx283->cci, IMX283_REG_TPG_PAT, in imx283_update_test_pattern()
746 return cci_write(imx283->cci, IMX283_REG_TPG_CTRL, in imx283_update_test_pattern()
752 struct imx283 *imx283 = container_of(ctrl->handler, struct imx283, in imx283_set_ctrl()
762 state = v4l2_subdev_get_locked_active_state(&imx283->sd); in imx283_set_ctrl()
765 get_mode_table(fmt->code, &mode_list, &num_modes); in imx283_set_ctrl()
767 fmt->width, fmt->height); in imx283_set_ctrl()
773 if (ctrl->id == V4L2_CID_VBLANK) { in imx283_set_ctrl()
777 imx283->vmax = mode->height + ctrl->val; in imx283_set_ctrl()
782 current_exposure = imx283->exposure->val; in imx283_set_ctrl()
786 __v4l2_ctrl_modify_range(imx283->exposure, min_exposure, in imx283_set_ctrl()
794 if (!pm_runtime_get_if_active(imx283->dev)) in imx283_set_ctrl()
797 switch (ctrl->id) { in imx283_set_ctrl()
799 shr = imx283_shr(imx283, mode, ctrl->val); in imx283_set_ctrl()
800 dev_dbg(imx283->dev, "V4L2_CID_EXPOSURE : %d - SHR: %lld\n", in imx283_set_ctrl()
801 ctrl->val, shr); in imx283_set_ctrl()
802 ret = cci_write(imx283->cci, IMX283_REG_SHR, shr, NULL); in imx283_set_ctrl()
807 imx283->hmax = imx283_internal_clock(pixel_rate, mode->width + ctrl->val); in imx283_set_ctrl()
808 dev_dbg(imx283->dev, "V4L2_CID_HBLANK : %d HMAX : %u\n", in imx283_set_ctrl()
809 ctrl->val, imx283->hmax); in imx283_set_ctrl()
810 ret = cci_write(imx283->cci, IMX283_REG_HMAX, imx283->hmax, NULL); in imx283_set_ctrl()
814 imx283->vmax = mode->height + ctrl->val; in imx283_set_ctrl()
815 dev_dbg(imx283->dev, "V4L2_CID_VBLANK : %d VMAX : %u\n", in imx283_set_ctrl()
816 ctrl->val, imx283->vmax); in imx283_set_ctrl()
817 ret = cci_write(imx283->cci, IMX283_REG_VMAX, imx283->vmax, NULL); in imx283_set_ctrl()
821 ret = cci_write(imx283->cci, IMX283_REG_ANALOG_GAIN, ctrl->val, NULL); in imx283_set_ctrl()
825 ret = cci_write(imx283->cci, IMX283_REG_DIGITAL_GAIN, ctrl->val, NULL); in imx283_set_ctrl()
833 if (ctrl->val) { in imx283_set_ctrl()
834 cci_write(imx283->cci, IMX283_REG_HTRIMMING, in imx283_set_ctrl()
837 cci_write(imx283->cci, IMX283_REG_HTRIMMING, in imx283_set_ctrl()
843 ret = imx283_update_test_pattern(imx283, ctrl->val); in imx283_set_ctrl()
847 dev_err(imx283->dev, "ctrl(id:0x%x, val:0x%x) is not handled\n", in imx283_set_ctrl()
848 ctrl->id, ctrl->val); in imx283_set_ctrl()
852 pm_runtime_put(imx283->dev); in imx283_set_ctrl()
865 if (code->index >= ARRAY_SIZE(imx283_mbus_codes)) in imx283_enum_mbus_code()
866 return -EINVAL; in imx283_enum_mbus_code()
868 code->code = imx283_mbus_codes[code->index]; in imx283_enum_mbus_code()
880 get_mode_table(fse->code, &mode_list, &num_modes); in imx283_enum_frame_size()
882 if (fse->index >= num_modes) in imx283_enum_frame_size()
883 return -EINVAL; in imx283_enum_frame_size()
885 fse->min_width = mode_list[fse->index].width; in imx283_enum_frame_size()
886 fse->max_width = fse->min_width; in imx283_enum_frame_size()
887 fse->min_height = mode_list[fse->index].height; in imx283_enum_frame_size()
888 fse->max_height = fse->min_height; in imx283_enum_frame_size()
897 format->width = mode->width; in imx283_update_image_pad_format()
898 format->height = mode->height; in imx283_update_image_pad_format()
899 format->field = V4L2_FIELD_NONE; in imx283_update_image_pad_format()
900 format->colorspace = V4L2_COLORSPACE_RAW; in imx283_update_image_pad_format()
901 format->ycbcr_enc = V4L2_YCBCR_ENC_601; in imx283_update_image_pad_format()
902 format->quantization = V4L2_QUANTIZATION_FULL_RANGE; in imx283_update_image_pad_format()
903 format->xfer_func = V4L2_XFER_FUNC_NONE; in imx283_update_image_pad_format()
918 format->code = MEDIA_BUS_FMT_SRGGB12_1X12; in imx283_init_state()
923 *crop = mode->crop; in imx283_init_state()
935 imx283->hmax = imx283_internal_clock(pixel_rate, mode->default_hmax); in imx283_set_framing_limits()
936 imx283->vmax = mode->default_vmax; in imx283_set_framing_limits()
942 min_hblank = mode->min_hmax - mode->width; in imx283_set_framing_limits()
943 max_hblank = imx283_iclk_to_pix(pixel_rate, IMX283_HMAX_MAX) - mode->width; in imx283_set_framing_limits()
944 def_hblank = mode->default_hmax - mode->width; in imx283_set_framing_limits()
945 __v4l2_ctrl_modify_range(imx283->hblank, min_hblank, max_hblank, 1, in imx283_set_framing_limits()
947 __v4l2_ctrl_s_ctrl(imx283->hblank, def_hblank); in imx283_set_framing_limits()
950 __v4l2_ctrl_modify_range(imx283->vblank, mode->min_vmax - mode->height, in imx283_set_framing_limits()
951 IMX283_VMAX_MAX - mode->height, 1, in imx283_set_framing_limits()
952 mode->default_vmax - mode->height); in imx283_set_framing_limits()
953 __v4l2_ctrl_s_ctrl(imx283->vblank, mode->default_vmax - mode->height); in imx283_set_framing_limits()
966 get_mode_table(fmt->format.code, &mode_list, &num_modes); in imx283_set_pad_format()
969 fmt->format.width, fmt->format.height); in imx283_set_pad_format()
971 fmt->format.width = mode->width; in imx283_set_pad_format()
972 fmt->format.height = mode->height; in imx283_set_pad_format()
973 fmt->format.field = V4L2_FIELD_NONE; in imx283_set_pad_format()
974 fmt->format.colorspace = V4L2_COLORSPACE_RAW; in imx283_set_pad_format()
975 fmt->format.ycbcr_enc = V4L2_YCBCR_ENC_601; in imx283_set_pad_format()
976 fmt->format.quantization = V4L2_QUANTIZATION_FULL_RANGE; in imx283_set_pad_format()
977 fmt->format.xfer_func = V4L2_XFER_FUNC_NONE; in imx283_set_pad_format()
981 if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE) in imx283_set_pad_format()
984 *format = fmt->format; in imx283_set_pad_format()
994 cci_write(imx283->cci, IMX283_REG_STANDBY, in imx283_standby_cancel()
998 cci_multi_reg_write(imx283->cci, imx283->freq->regs, in imx283_standby_cancel()
999 imx283->freq->reg_count, &ret); in imx283_standby_cancel()
1001 dev_dbg(imx283->dev, "Using clk freq %ld MHz", in imx283_standby_cancel()
1002 imx283->freq->mhz / HZ_PER_MHZ); in imx283_standby_cancel()
1005 cci_write(imx283->cci, IMX283_REG_PLSTMG08, IMX283_PLSTMG08_VAL, &ret); in imx283_standby_cancel()
1006 cci_write(imx283->cci, IMX283_REG_PLSTMG02, IMX283_PLSTMG02_VAL, &ret); in imx283_standby_cancel()
1009 cci_write(imx283->cci, IMX283_REG_STBPL, IMX283_STBPL_NORMAL, &ret); in imx283_standby_cancel()
1012 link_freq_idx = __ffs(imx283->link_freq_bitmap); in imx283_standby_cancel()
1013 cci_multi_reg_write(imx283->cci, link_freq_reglist[link_freq_idx].regs, in imx283_standby_cancel()
1021 cci_write(imx283->cci, IMX283_REG_STANDBY, IMX283_ACTIVE, &ret); in imx283_standby_cancel()
1026 cci_write(imx283->cci, IMX283_REG_CLAMP, IMX283_CLPSQRST, &ret); in imx283_standby_cancel()
1027 cci_write(imx283->cci, IMX283_REG_XMSTA, 0, &ret); in imx283_standby_cancel()
1028 cci_write(imx283->cci, IMX283_REG_SYNCDRV, IMX283_SYNCDRV_XHS_XVS, &ret); in imx283_standby_cancel()
1049 get_mode_table(fmt->code, &mode_list, &num_modes); in imx283_start_streaming()
1051 fmt->width, fmt->height); in imx283_start_streaming()
1055 dev_err(imx283->dev, "failed to cancel standby\n"); in imx283_start_streaming()
1063 readout = &imx283_readout_modes[mode->mode]; in imx283_start_streaming()
1064 cci_write(imx283->cci, IMX283_REG_MDSEL1, readout->mdsel1, &ret); in imx283_start_streaming()
1065 cci_write(imx283->cci, IMX283_REG_MDSEL2, readout->mdsel2, &ret); in imx283_start_streaming()
1066 cci_write(imx283->cci, IMX283_REG_MDSEL3, in imx283_start_streaming()
1067 readout->mdsel3 | IMX283_MDSEL3_VCROP_EN, &ret); in imx283_start_streaming()
1068 cci_write(imx283->cci, IMX283_REG_MDSEL4, in imx283_start_streaming()
1069 readout->mdsel4 | IMX283_MDSEL4_VCROP_EN, &ret); in imx283_start_streaming()
1072 if (mode->mode == IMX283_MODE_1S) { in imx283_start_streaming()
1073 cci_write(imx283->cci, IMX283_REG_MDSEL7, 0x01, &ret); in imx283_start_streaming()
1074 cci_write(imx283->cci, IMX283_REG_MDSEL18, 0x1098, &ret); in imx283_start_streaming()
1078 dev_err(imx283->dev, "failed to set readout\n"); in imx283_start_streaming()
1082 /* Initialise SVR. Unsupported for now - Always 0 */ in imx283_start_streaming()
1083 cci_write(imx283->cci, IMX283_REG_SVR, 0x00, &ret); in imx283_start_streaming()
1085 dev_dbg(imx283->dev, "Mode: Size %d x %d\n", mode->width, mode->height); in imx283_start_streaming()
1086 dev_dbg(imx283->dev, "Analogue Crop (in the mode) %d,%d %dx%d\n", in imx283_start_streaming()
1087 mode->crop.left, in imx283_start_streaming()
1088 mode->crop.top, in imx283_start_streaming()
1089 mode->crop.width, in imx283_start_streaming()
1090 mode->crop.height); in imx283_start_streaming()
1092 y_out_size = mode->crop.height / mode->vbin_ratio; in imx283_start_streaming()
1093 write_v_size = y_out_size + mode->vertical_ob; in imx283_start_streaming()
1098 v_pos = imx283->vflip->val ? in imx283_start_streaming()
1099 ((-mode->crop.top / mode->vbin_ratio) / 2) + mode->vst : in imx283_start_streaming()
1100 ((mode->crop.top / mode->vbin_ratio) / 2) + mode->vst; in imx283_start_streaming()
1101 v_widcut = ((mode->veff - y_out_size) / 2) + mode->vct; in imx283_start_streaming()
1103 cci_write(imx283->cci, IMX283_REG_Y_OUT_SIZE, y_out_size, &ret); in imx283_start_streaming()
1104 cci_write(imx283->cci, IMX283_REG_WRITE_VSIZE, write_v_size, &ret); in imx283_start_streaming()
1105 cci_write(imx283->cci, IMX283_REG_VWIDCUT, v_widcut, &ret); in imx283_start_streaming()
1106 cci_write(imx283->cci, IMX283_REG_VWINPOS, v_pos, &ret); in imx283_start_streaming()
1108 cci_write(imx283->cci, IMX283_REG_OB_SIZE_V, mode->vertical_ob, &ret); in imx283_start_streaming()
1110 /* TODO: Validate mode->crop is fully contained within imx283_native_area */ in imx283_start_streaming()
1111 cci_write(imx283->cci, IMX283_REG_HTRIMMING_START, mode->crop.left, &ret); in imx283_start_streaming()
1112 cci_write(imx283->cci, IMX283_REG_HTRIMMING_END, in imx283_start_streaming()
1113 mode->crop.left + mode->crop.width, &ret); in imx283_start_streaming()
1116 cci_write(imx283->cci, IMX283_REG_EBD_X_OUT_SIZE, 0, &ret); in imx283_start_streaming()
1119 ret = __v4l2_ctrl_handler_setup(imx283->sd.ctrl_handler); in imx283_start_streaming()
1132 return -EINVAL; in imx283_enable_streams()
1134 ret = pm_runtime_get_sync(imx283->dev); in imx283_enable_streams()
1136 pm_runtime_put_noidle(imx283->dev); in imx283_enable_streams()
1147 pm_runtime_mark_last_busy(imx283->dev); in imx283_enable_streams()
1148 pm_runtime_put_autosuspend(imx283->dev); in imx283_enable_streams()
1161 return -EINVAL; in imx283_disable_streams()
1163 ret = cci_write(imx283->cci, IMX283_REG_STANDBY, IMX283_STBLOGIC, NULL); in imx283_disable_streams()
1165 dev_err(imx283->dev, "Failed to stop stream\n"); in imx283_disable_streams()
1167 pm_runtime_mark_last_busy(imx283->dev); in imx283_disable_streams()
1168 pm_runtime_put_autosuspend(imx283->dev); in imx283_disable_streams()
1179 imx283->supplies); in imx283_power_on()
1181 dev_err(imx283->dev, "failed to enable regulators\n"); in imx283_power_on()
1185 ret = clk_prepare_enable(imx283->xclk); in imx283_power_on()
1187 dev_err(imx283->dev, "failed to enable clock\n"); in imx283_power_on()
1191 gpiod_set_value_cansleep(imx283->reset_gpio, 0); in imx283_power_on()
1199 regulator_bulk_disable(ARRAY_SIZE(imx283_supply_name), imx283->supplies); in imx283_power_on()
1205 gpiod_set_value_cansleep(imx283->reset_gpio, 1); in imx283_power_off()
1206 regulator_bulk_disable(ARRAY_SIZE(imx283_supply_name), imx283->supplies); in imx283_power_off()
1207 clk_disable_unprepare(imx283->xclk); in imx283_power_off()
1235 imx283->supplies[i].supply = imx283_supply_name[i]; in imx283_get_regulators()
1237 return devm_regulator_bulk_get(imx283->dev, in imx283_get_regulators()
1239 imx283->supplies); in imx283_get_regulators()
1248 ret = cci_read(imx283->cci, IMX283_REG_CHIP_ID, &val, NULL); in imx283_identify_module()
1250 dev_err(imx283->dev, "failed to read chip id %x, with error %d\n", in imx283_identify_module()
1256 dev_err(imx283->dev, "chip id mismatch: %x!=%llx\n", in imx283_identify_module()
1258 return -EIO; in imx283_identify_module()
1268 switch (sel->target) { in imx283_get_selection()
1270 sel->r = *v4l2_subdev_state_get_crop(sd_state, 0); in imx283_get_selection()
1275 sel->r = imx283_native_area; in imx283_get_selection()
1280 sel->r = imx283_active_area; in imx283_get_selection()
1283 return -EINVAL; in imx283_get_selection()
1327 ctrl_hdlr = &imx283->ctrl_handler; in imx283_init_controls()
1345 __fls(imx283->link_freq_bitmap), in imx283_init_controls()
1346 __ffs(imx283->link_freq_bitmap), in imx283_init_controls()
1349 link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY; in imx283_init_controls()
1352 imx283->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx283_ctrl_ops, in imx283_init_controls()
1354 mode->min_vmax - mode->height, in imx283_init_controls()
1356 mode->default_vmax - mode->height); in imx283_init_controls()
1358 min_hblank = mode->min_hmax - mode->width; in imx283_init_controls()
1359 max_hblank = imx283_iclk_to_pix(pixel_rate, IMX283_HMAX_MAX) - mode->width; in imx283_init_controls()
1360 def_hblank = mode->default_hmax - mode->width; in imx283_init_controls()
1361 imx283->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx283_ctrl_ops, in imx283_init_controls()
1365 imx283->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &imx283_ctrl_ops, in imx283_init_controls()
1380 imx283->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx283_ctrl_ops, V4L2_CID_VFLIP, in imx283_init_controls()
1382 if (imx283->vflip) in imx283_init_controls()
1383 imx283->vflip->flags |= V4L2_CTRL_FLAG_MODIFY_LAYOUT; in imx283_init_controls()
1387 ARRAY_SIZE(imx283_tpg_menu) - 1, in imx283_init_controls()
1390 if (ctrl_hdlr->error) { in imx283_init_controls()
1391 ret = ctrl_hdlr->error; in imx283_init_controls()
1392 dev_err(imx283->dev, "control init failed (%d)\n", ret); in imx283_init_controls()
1396 ret = v4l2_fwnode_device_parse(imx283->dev, &props); in imx283_init_controls()
1405 imx283->sd.ctrl_handler = ctrl_hdlr; in imx283_init_controls()
1407 mutex_lock(imx283->ctrl_handler.lock); in imx283_init_controls()
1412 mutex_unlock(imx283->ctrl_handler.lock); in imx283_init_controls()
1431 fwnode = dev_fwnode(imx283->dev); in imx283_parse_endpoint()
1434 dev_err(imx283->dev, "Failed to get next endpoint\n"); in imx283_parse_endpoint()
1435 return -ENXIO; in imx283_parse_endpoint()
1444 dev_err(imx283->dev, in imx283_parse_endpoint()
1447 ret = -EINVAL; in imx283_parse_endpoint()
1451 ret = v4l2_link_freq_to_bitmap(imx283->dev, bus_cfg.link_frequencies, in imx283_parse_endpoint()
1454 &imx283->link_freq_bitmap); in imx283_parse_endpoint()
1469 imx283 = devm_kzalloc(&client->dev, sizeof(*imx283), GFP_KERNEL); in imx283_probe()
1471 return -ENOMEM; in imx283_probe()
1473 imx283->dev = &client->dev; in imx283_probe()
1475 v4l2_i2c_subdev_init(&imx283->sd, client, &imx283_subdev_ops); in imx283_probe()
1477 imx283->cci = devm_cci_regmap_init_i2c(client, 16); in imx283_probe()
1478 if (IS_ERR(imx283->cci)) { in imx283_probe()
1479 ret = PTR_ERR(imx283->cci); in imx283_probe()
1480 dev_err(imx283->dev, "failed to initialize CCI: %d\n", ret); in imx283_probe()
1485 imx283->xclk = devm_clk_get(imx283->dev, NULL); in imx283_probe()
1486 if (IS_ERR(imx283->xclk)) { in imx283_probe()
1487 return dev_err_probe(imx283->dev, PTR_ERR(imx283->xclk), in imx283_probe()
1491 xclk_freq = clk_get_rate(imx283->xclk); in imx283_probe()
1494 imx283->freq = &imx283_frequencies[i]; in imx283_probe()
1498 if (!imx283->freq) { in imx283_probe()
1499 dev_err(imx283->dev, "xclk frequency unsupported: %d Hz\n", xclk_freq); in imx283_probe()
1500 return -EINVAL; in imx283_probe()
1505 return dev_err_probe(imx283->dev, ret, in imx283_probe()
1511 dev_err(imx283->dev, "failed to parse endpoint configuration\n"); in imx283_probe()
1516 imx283->reset_gpio = devm_gpiod_get_optional(imx283->dev, "reset", in imx283_probe()
1518 if (IS_ERR(imx283->reset_gpio)) in imx283_probe()
1519 return dev_err_probe(imx283->dev, PTR_ERR(imx283->reset_gpio), in imx283_probe()
1539 pm_runtime_set_active(imx283->dev); in imx283_probe()
1540 pm_runtime_get_noresume(imx283->dev); in imx283_probe()
1541 pm_runtime_enable(imx283->dev); in imx283_probe()
1542 pm_runtime_set_autosuspend_delay(imx283->dev, 1000); in imx283_probe()
1543 pm_runtime_use_autosuspend(imx283->dev); in imx283_probe()
1551 imx283->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | in imx283_probe()
1553 imx283->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR; in imx283_probe()
1554 imx283->sd.internal_ops = &imx283_internal_ops; in imx283_probe()
1557 imx283->pad.flags = MEDIA_PAD_FL_SOURCE; in imx283_probe()
1559 ret = media_entity_pads_init(&imx283->sd.entity, 1, &imx283->pad); in imx283_probe()
1561 dev_err(imx283->dev, "failed to init entity pads: %d\n", ret); in imx283_probe()
1565 imx283->sd.state_lock = imx283->ctrl_handler.lock; in imx283_probe()
1566 ret = v4l2_subdev_init_finalize(&imx283->sd); in imx283_probe()
1568 dev_err(imx283->dev, "subdev init error: %d\n", ret); in imx283_probe()
1572 ret = v4l2_async_register_subdev_sensor(&imx283->sd); in imx283_probe()
1574 dev_err(imx283->dev, "failed to register sensor sub-device: %d\n", ret); in imx283_probe()
1582 pm_runtime_mark_last_busy(imx283->dev); in imx283_probe()
1583 pm_runtime_put_autosuspend(imx283->dev); in imx283_probe()
1588 v4l2_subdev_cleanup(&imx283->sd); in imx283_probe()
1591 media_entity_cleanup(&imx283->sd.entity); in imx283_probe()
1594 v4l2_ctrl_handler_free(imx283->sd.ctrl_handler); in imx283_probe()
1597 pm_runtime_disable(imx283->dev); in imx283_probe()
1598 pm_runtime_set_suspended(imx283->dev); in imx283_probe()
1611 v4l2_subdev_cleanup(&imx283->sd); in imx283_remove()
1612 media_entity_cleanup(&sd->entity); in imx283_remove()
1613 v4l2_ctrl_handler_free(imx283->sd.ctrl_handler); in imx283_remove()
1615 pm_runtime_disable(imx283->dev); in imx283_remove()
1616 if (!pm_runtime_status_suspended(imx283->dev)) in imx283_remove()
1618 pm_runtime_set_suspended(imx283->dev); in imx283_remove()