Lines Matching +full:csi +full:- +full:bridge +full:- +full:axi
1 // SPDX-License-Identifier: GPL-2.0
3 * Samsung CSIS MIPI CSI-2 receiver driver.
5 * The Samsung CSIS IP is a MIPI CSI-2 receiver found in various NXP i.MX7 and
10 * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. All Rights Reserved.
11 * Copyright (C) 2011 - 2013 Samsung Electronics Co., Ltd.
32 #include <media/v4l2-common.h>
33 #include <media/v4l2-device.h>
34 #include <media/v4l2-fwnode.h>
35 #include <media/v4l2-mc.h>
36 #include <media/v4l2-subdev.h>
38 #define CSIS_DRIVER_NAME "imx-mipi-csis"
112 /* D-PHY status control */
119 /* D-PHY common control */
131 /* D-PHY Master and Slave Control register Low */
167 /* D-PHY Master and Slave Control register High */
169 /* D-PHY Slave Control register Low */
171 /* D-PHY Slave Control register High */
225 /* Non-image packet data buffers */
232 /* MIPI CSI-2 Data Types */
274 /* Non-image data receive events */
275 { false, MIPI_CSIS_INT_SRC_EVEN_BEFORE, "Non-image data before even frame" },
276 { false, MIPI_CSIS_INT_SRC_EVEN_AFTER, "Non-image data after even frame" },
277 { false, MIPI_CSIS_INT_SRC_ODD_BEFORE, "Non-image data before odd frame" },
278 { false, MIPI_CSIS_INT_SRC_ODD_AFTER, "Non-image data after odd frame" },
299 "axi",
344 /* -----------------------------------------------------------------------------
479 * The CSI-2 specification suggests in Annex A "JPEG8 Data
487 * the IP cores connected to the CSIS in i.MX SoCs (CSI bridge
512 /* -----------------------------------------------------------------------------
518 return readl(csis->regs + reg); in mipi_csis_read()
524 writel(val, csis->regs + reg); in mipi_csis_write()
556 mask = (1 << (csis->bus.num_data_lanes + 1)) - 1; in mipi_csis_system_enable()
565 struct v4l2_mbus_framefmt *mf = &csis->format_mbus[CSIS_PAD_SINK]; in __mipi_csis_set_format()
576 * respectively, although the 8-bit mode transfers half a pixel per in __mipi_csis_set_format()
577 * clock sample and the 16-bit mode one pixel). While both mode work in __mipi_csis_set_format()
580 * that integrate the CSIS can operate in 16-bit bit mode, and some do in __mipi_csis_set_format()
581 * not support 8-bit mode (this is the case of the i.MX8MP), use dual in __mipi_csis_set_format()
586 if (csis->csis_fmt->data_type == MIPI_CSI2_DATA_TYPE_YUV422_8) in __mipi_csis_set_format()
589 val |= MIPI_CSIS_ISPCFG_FMT(csis->csis_fmt->data_type); in __mipi_csis_set_format()
593 val = mf->width | (mf->height << 16); in __mipi_csis_set_format()
603 link_freq = v4l2_get_link_freq(csis->src_sd->ctrl_handler, in mipi_csis_calculate_params()
604 csis->csis_fmt->width, in mipi_csis_calculate_params()
605 csis->bus.num_data_lanes * 2); in mipi_csis_calculate_params()
607 dev_err(csis->dev, "Unable to obtain link frequency: %d\n", in mipi_csis_calculate_params()
615 dev_dbg(csis->dev, "Out-of-bound lane rate %u\n", lane_rate); in mipi_csis_calculate_params()
616 return -EINVAL; in mipi_csis_calculate_params()
622 * (which is documented as corresponding to CSI-2 v0.87 to v1.00) until in mipi_csis_calculate_params()
625 csis->hs_settle = (lane_rate - 5000000) / 45000000; in mipi_csis_calculate_params()
626 csis->clk_settle = 0; in mipi_csis_calculate_params()
628 dev_dbg(csis->dev, "lane rate %u, Tclk_settle %u, Ths_settle %u\n", in mipi_csis_calculate_params()
629 lane_rate, csis->clk_settle, csis->hs_settle); in mipi_csis_calculate_params()
631 if (csis->debug.hs_settle < 0xff) { in mipi_csis_calculate_params()
632 dev_dbg(csis->dev, "overriding Ths_settle with %u\n", in mipi_csis_calculate_params()
633 csis->debug.hs_settle); in mipi_csis_calculate_params()
634 csis->hs_settle = csis->debug.hs_settle; in mipi_csis_calculate_params()
637 if (csis->debug.clk_settle < 4) { in mipi_csis_calculate_params()
638 dev_dbg(csis->dev, "overriding Tclk_settle with %u\n", in mipi_csis_calculate_params()
639 csis->debug.clk_settle); in mipi_csis_calculate_params()
640 csis->clk_settle = csis->debug.clk_settle; in mipi_csis_calculate_params()
648 int lanes = csis->bus.num_data_lanes; in mipi_csis_set_params()
653 val |= (lanes - 1) << MIPI_CSIS_CMN_CTRL_LANE_NR_OFFSET; in mipi_csis_set_params()
654 if (csis->info->version == MIPI_CSIS_V3_3) in mipi_csis_set_params()
661 MIPI_CSIS_DPHY_CMN_CTRL_HSSETTLE(csis->hs_settle) | in mipi_csis_set_params()
662 MIPI_CSIS_DPHY_CMN_CTRL_CLKSETTLE(csis->clk_settle)); in mipi_csis_set_params()
694 return clk_bulk_prepare_enable(csis->info->num_clocks, csis->clks); in mipi_csis_clk_enable()
699 clk_bulk_disable_unprepare(csis->info->num_clocks, csis->clks); in mipi_csis_clk_disable()
707 csis->clks = devm_kcalloc(csis->dev, csis->info->num_clocks, in mipi_csis_clk_get()
708 sizeof(*csis->clks), GFP_KERNEL); in mipi_csis_clk_get()
710 if (!csis->clks) in mipi_csis_clk_get()
711 return -ENOMEM; in mipi_csis_clk_get()
713 for (i = 0; i < csis->info->num_clocks; i++) in mipi_csis_clk_get()
714 csis->clks[i].id = mipi_csis_clk_id[i]; in mipi_csis_clk_get()
716 ret = devm_clk_bulk_get(csis->dev, csis->info->num_clocks, in mipi_csis_clk_get()
717 csis->clks); in mipi_csis_clk_get()
722 ret = clk_set_rate(csis->clks[MIPI_CSIS_CLK_WRAP].clk, in mipi_csis_clk_get()
723 csis->clk_frequency); in mipi_csis_clk_get()
725 dev_err(csis->dev, "set rate=%d failed: %d\n", in mipi_csis_clk_get()
726 csis->clk_frequency, ret); in mipi_csis_clk_get()
756 spin_lock_irqsave(&csis->slock, flags); in mipi_csis_irq_handler()
759 if ((status & MIPI_CSIS_INT_SRC_ERRORS) || csis->debug.enable) { in mipi_csis_irq_handler()
761 struct mipi_csis_event *event = &csis->events[i]; in mipi_csis_irq_handler()
763 if ((!event->debug && (status & event->mask)) || in mipi_csis_irq_handler()
764 (event->debug && (dbg_status & event->mask))) in mipi_csis_irq_handler()
765 event->counter++; in mipi_csis_irq_handler()
768 spin_unlock_irqrestore(&csis->slock, flags); in mipi_csis_irq_handler()
776 /* -----------------------------------------------------------------------------
782 if (csis->info->version != MIPI_CSIS_V3_3) in mipi_csis_phy_enable()
785 return regulator_enable(csis->mipi_phy_regulator); in mipi_csis_phy_enable()
790 if (csis->info->version != MIPI_CSIS_V3_3) in mipi_csis_phy_disable()
793 return regulator_disable(csis->mipi_phy_regulator); in mipi_csis_phy_disable()
798 if (csis->info->version != MIPI_CSIS_V3_3) in mipi_csis_phy_reset()
801 reset_control_assert(csis->mrst); in mipi_csis_phy_reset()
803 reset_control_deassert(csis->mrst); in mipi_csis_phy_reset()
808 if (csis->info->version != MIPI_CSIS_V3_3) in mipi_csis_phy_init()
812 csis->mrst = devm_reset_control_get_exclusive(csis->dev, NULL); in mipi_csis_phy_init()
813 if (IS_ERR(csis->mrst)) in mipi_csis_phy_init()
814 return PTR_ERR(csis->mrst); in mipi_csis_phy_init()
816 csis->mipi_phy_regulator = devm_regulator_get(csis->dev, "phy"); in mipi_csis_phy_init()
817 if (IS_ERR(csis->mipi_phy_regulator)) in mipi_csis_phy_init()
818 return PTR_ERR(csis->mipi_phy_regulator); in mipi_csis_phy_init()
820 return regulator_set_voltage(csis->mipi_phy_regulator, 1000000, in mipi_csis_phy_init()
824 /* -----------------------------------------------------------------------------
833 spin_lock_irqsave(&csis->slock, flags); in mipi_csis_clear_counters()
835 csis->events[i].counter = 0; in mipi_csis_clear_counters()
836 spin_unlock_irqrestore(&csis->slock, flags); in mipi_csis_clear_counters()
842 : MIPI_CSIS_NUM_EVENTS - 8; in mipi_csis_log_counters()
846 spin_lock_irqsave(&csis->slock, flags); in mipi_csis_log_counters()
849 if (csis->events[i].counter > 0 || csis->debug.enable) in mipi_csis_log_counters()
850 dev_info(csis->dev, "%s events: %d\n", in mipi_csis_log_counters()
851 csis->events[i].name, in mipi_csis_log_counters()
852 csis->events[i].counter); in mipi_csis_log_counters()
854 spin_unlock_irqrestore(&csis->slock, flags); in mipi_csis_log_counters()
881 if (!pm_runtime_get_if_in_use(csis->dev)) in mipi_csis_dump_regs()
884 dev_info(csis->dev, "--- REGISTERS ---\n"); in mipi_csis_dump_regs()
888 dev_info(csis->dev, "%14s: 0x%08x\n", registers[i].name, cfg); in mipi_csis_dump_regs()
891 pm_runtime_put(csis->dev); in mipi_csis_dump_regs()
898 struct mipi_csis_device *csis = m->private; in mipi_csis_dump_regs_show()
906 csis->debug.hs_settle = UINT_MAX; in mipi_csis_debugfs_init()
907 csis->debug.clk_settle = UINT_MAX; in mipi_csis_debugfs_init()
909 csis->debugfs_root = debugfs_create_dir(dev_name(csis->dev), NULL); in mipi_csis_debugfs_init()
911 debugfs_create_bool("debug_enable", 0600, csis->debugfs_root, in mipi_csis_debugfs_init()
912 &csis->debug.enable); in mipi_csis_debugfs_init()
913 debugfs_create_file("dump_regs", 0600, csis->debugfs_root, csis, in mipi_csis_debugfs_init()
915 debugfs_create_u32("tclk_settle", 0600, csis->debugfs_root, in mipi_csis_debugfs_init()
916 &csis->debug.clk_settle); in mipi_csis_debugfs_init()
917 debugfs_create_u32("ths_settle", 0600, csis->debugfs_root, in mipi_csis_debugfs_init()
918 &csis->debug.hs_settle); in mipi_csis_debugfs_init()
923 debugfs_remove_recursive(csis->debugfs_root); in mipi_csis_debugfs_exit()
926 /* -----------------------------------------------------------------------------
941 mutex_lock(&csis->lock); in mipi_csis_s_stream()
943 v4l2_subdev_call(csis->src_sd, video, s_stream, 0); in mipi_csis_s_stream()
946 if (csis->debug.enable) in mipi_csis_s_stream()
949 mutex_unlock(&csis->lock); in mipi_csis_s_stream()
951 pm_runtime_put(csis->dev); in mipi_csis_s_stream()
962 ret = pm_runtime_resume_and_get(csis->dev); in mipi_csis_s_stream()
966 mutex_lock(&csis->lock); in mipi_csis_s_stream()
969 ret = v4l2_subdev_call(csis->src_sd, video, s_stream, 1); in mipi_csis_s_stream()
975 mutex_unlock(&csis->lock); in mipi_csis_s_stream()
981 mutex_unlock(&csis->lock); in mipi_csis_s_stream()
982 pm_runtime_put(csis->dev); in mipi_csis_s_stream()
994 return v4l2_subdev_get_try_format(&csis->sd, sd_state, pad); in mipi_csis_get_format()
996 return &csis->format_mbus[pad]; in mipi_csis_get_format()
1010 fmt_sink->code = MEDIA_BUS_FMT_UYVY8_1X16; in mipi_csis_init_cfg()
1011 fmt_sink->width = MIPI_CSIS_DEF_PIX_WIDTH; in mipi_csis_init_cfg()
1012 fmt_sink->height = MIPI_CSIS_DEF_PIX_HEIGHT; in mipi_csis_init_cfg()
1013 fmt_sink->field = V4L2_FIELD_NONE; in mipi_csis_init_cfg()
1015 fmt_sink->colorspace = V4L2_COLORSPACE_SMPTE170M; in mipi_csis_init_cfg()
1016 fmt_sink->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(fmt_sink->colorspace); in mipi_csis_init_cfg()
1017 fmt_sink->ycbcr_enc = V4L2_MAP_YCBCR_ENC_DEFAULT(fmt_sink->colorspace); in mipi_csis_init_cfg()
1018 fmt_sink->quantization = in mipi_csis_init_cfg()
1019 V4L2_MAP_QUANTIZATION_DEFAULT(false, fmt_sink->colorspace, in mipi_csis_init_cfg()
1020 fmt_sink->ycbcr_enc); in mipi_csis_init_cfg()
1036 fmt = mipi_csis_get_format(csis, sd_state, sdformat->which, in mipi_csis_get_fmt()
1037 sdformat->pad); in mipi_csis_get_fmt()
1039 mutex_lock(&csis->lock); in mipi_csis_get_fmt()
1040 sdformat->format = *fmt; in mipi_csis_get_fmt()
1041 mutex_unlock(&csis->lock); in mipi_csis_get_fmt()
1056 if (code->pad == CSIS_PAD_SOURCE) { in mipi_csis_enum_mbus_code()
1059 if (code->index > 0) in mipi_csis_enum_mbus_code()
1060 return -EINVAL; in mipi_csis_enum_mbus_code()
1062 fmt = mipi_csis_get_format(csis, sd_state, code->which, in mipi_csis_enum_mbus_code()
1063 code->pad); in mipi_csis_enum_mbus_code()
1064 code->code = fmt->code; in mipi_csis_enum_mbus_code()
1068 if (code->pad != CSIS_PAD_SINK) in mipi_csis_enum_mbus_code()
1069 return -EINVAL; in mipi_csis_enum_mbus_code()
1071 if (code->index >= ARRAY_SIZE(mipi_csis_formats)) in mipi_csis_enum_mbus_code()
1072 return -EINVAL; in mipi_csis_enum_mbus_code()
1074 code->code = mipi_csis_formats[code->index].code; in mipi_csis_enum_mbus_code()
1092 if (sdformat->pad == CSIS_PAD_SOURCE) in mipi_csis_set_fmt()
1095 if (sdformat->pad != CSIS_PAD_SINK) in mipi_csis_set_fmt()
1096 return -EINVAL; in mipi_csis_set_fmt()
1105 csis_fmt = find_csis_format(sdformat->format.code); in mipi_csis_set_fmt()
1109 switch (csis_fmt->width % 8) { in mipi_csis_set_fmt()
1126 v4l_bound_align_image(&sdformat->format.width, 1, in mipi_csis_set_fmt()
1128 &sdformat->format.height, 1, in mipi_csis_set_fmt()
1131 fmt = mipi_csis_get_format(csis, sd_state, sdformat->which, in mipi_csis_set_fmt()
1132 sdformat->pad); in mipi_csis_set_fmt()
1134 mutex_lock(&csis->lock); in mipi_csis_set_fmt()
1136 fmt->code = csis_fmt->code; in mipi_csis_set_fmt()
1137 fmt->width = sdformat->format.width; in mipi_csis_set_fmt()
1138 fmt->height = sdformat->format.height; in mipi_csis_set_fmt()
1139 fmt->colorspace = sdformat->format.colorspace; in mipi_csis_set_fmt()
1140 fmt->quantization = sdformat->format.quantization; in mipi_csis_set_fmt()
1141 fmt->xfer_func = sdformat->format.xfer_func; in mipi_csis_set_fmt()
1142 fmt->ycbcr_enc = sdformat->format.ycbcr_enc; in mipi_csis_set_fmt()
1144 sdformat->format = *fmt; in mipi_csis_set_fmt()
1147 fmt = mipi_csis_get_format(csis, sd_state, sdformat->which, in mipi_csis_set_fmt()
1149 *fmt = sdformat->format; in mipi_csis_set_fmt()
1152 fmt->code = csis_fmt->output; in mipi_csis_set_fmt()
1155 if (sdformat->which == V4L2_SUBDEV_FORMAT_ACTIVE) in mipi_csis_set_fmt()
1156 csis->csis_fmt = csis_fmt; in mipi_csis_set_fmt()
1158 mutex_unlock(&csis->lock); in mipi_csis_set_fmt()
1167 struct v4l2_mbus_frame_desc_entry *entry = &fd->entry[0]; in mipi_csis_get_frame_desc()
1170 return -EINVAL; in mipi_csis_get_frame_desc()
1172 fd->type = V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL; in mipi_csis_get_frame_desc()
1173 fd->num_entries = 1; in mipi_csis_get_frame_desc()
1177 mutex_lock(&csis->lock); in mipi_csis_get_frame_desc()
1179 entry->flags = 0; in mipi_csis_get_frame_desc()
1180 entry->pixelcode = csis->csis_fmt->code; in mipi_csis_get_frame_desc()
1181 entry->bus.csi2.vc = 0; in mipi_csis_get_frame_desc()
1182 entry->bus.csi2.dt = csis->csis_fmt->data_type; in mipi_csis_get_frame_desc()
1184 mutex_unlock(&csis->lock); in mipi_csis_get_frame_desc()
1194 if (csis->debug.enable) in mipi_csis_log_status()
1222 /* -----------------------------------------------------------------------------
1234 dev_dbg(csis->dev, "link setup %s -> %s", remote_pad->entity->name, in mipi_csis_link_setup()
1235 local_pad->entity->name); in mipi_csis_link_setup()
1238 if (!(local_pad->flags & MEDIA_PAD_FL_SINK)) in mipi_csis_link_setup()
1241 remote_sd = media_entity_to_v4l2_subdev(remote_pad->entity); in mipi_csis_link_setup()
1244 if (csis->src_sd) in mipi_csis_link_setup()
1245 return -EBUSY; in mipi_csis_link_setup()
1247 csis->src_sd = remote_sd; in mipi_csis_link_setup()
1249 csis->src_sd = NULL; in mipi_csis_link_setup()
1261 /* -----------------------------------------------------------------------------
1276 struct media_pad *sink = &csis->sd.entity.pads[CSIS_PAD_SINK]; in mipi_csis_notify_bound()
1295 v4l2_async_nf_init(&csis->notifier); in mipi_csis_async_register()
1297 ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(csis->dev), 0, 0, in mipi_csis_async_register()
1300 return -ENOTCONN; in mipi_csis_async_register()
1308 dev_err(csis->dev, in mipi_csis_async_register()
1310 ret = -EINVAL; in mipi_csis_async_register()
1315 csis->bus = vep.bus.mipi_csi2; in mipi_csis_async_register()
1317 dev_dbg(csis->dev, "data lanes: %d\n", csis->bus.num_data_lanes); in mipi_csis_async_register()
1318 dev_dbg(csis->dev, "flags: 0x%08x\n", csis->bus.flags); in mipi_csis_async_register()
1320 asd = v4l2_async_nf_add_fwnode_remote(&csis->notifier, ep, in mipi_csis_async_register()
1329 csis->notifier.ops = &mipi_csis_notify_ops; in mipi_csis_async_register()
1331 ret = v4l2_async_subdev_nf_register(&csis->sd, &csis->notifier); in mipi_csis_async_register()
1335 return v4l2_async_register_subdev(&csis->sd); in mipi_csis_async_register()
1343 /* -----------------------------------------------------------------------------
1353 mutex_lock(&csis->lock); in mipi_csis_runtime_suspend()
1362 mutex_unlock(&csis->lock); in mipi_csis_runtime_suspend()
1364 return ret ? -EAGAIN : 0; in mipi_csis_runtime_suspend()
1373 mutex_lock(&csis->lock); in mipi_csis_runtime_resume()
1382 mutex_unlock(&csis->lock); in mipi_csis_runtime_resume()
1384 return ret ? -EAGAIN : 0; in mipi_csis_runtime_resume()
1392 /* -----------------------------------------------------------------------------
1398 struct v4l2_subdev *sd = &csis->sd; in mipi_csis_subdev_init()
1401 sd->owner = THIS_MODULE; in mipi_csis_subdev_init()
1402 snprintf(sd->name, sizeof(sd->name), "csis-%s", in mipi_csis_subdev_init()
1403 dev_name(csis->dev)); in mipi_csis_subdev_init()
1405 sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; in mipi_csis_subdev_init()
1406 sd->ctrl_handler = NULL; in mipi_csis_subdev_init()
1408 sd->entity.function = MEDIA_ENT_F_VID_IF_BRIDGE; in mipi_csis_subdev_init()
1409 sd->entity.ops = &mipi_csis_entity_ops; in mipi_csis_subdev_init()
1411 sd->dev = csis->dev; in mipi_csis_subdev_init()
1413 sd->fwnode = fwnode_graph_get_endpoint_by_id(dev_fwnode(csis->dev), in mipi_csis_subdev_init()
1415 if (!sd->fwnode) { in mipi_csis_subdev_init()
1416 dev_err(csis->dev, "Unable to retrieve endpoint for port@1\n"); in mipi_csis_subdev_init()
1417 return -ENOENT; in mipi_csis_subdev_init()
1420 csis->csis_fmt = &mipi_csis_formats[0]; in mipi_csis_subdev_init()
1423 csis->pads[CSIS_PAD_SINK].flags = MEDIA_PAD_FL_SINK in mipi_csis_subdev_init()
1425 csis->pads[CSIS_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE in mipi_csis_subdev_init()
1427 return media_entity_pads_init(&sd->entity, CSIS_PADS_NUM, in mipi_csis_subdev_init()
1428 csis->pads); in mipi_csis_subdev_init()
1433 struct device_node *node = csis->dev->of_node; in mipi_csis_parse_dt()
1435 if (of_property_read_u32(node, "clock-frequency", in mipi_csis_parse_dt()
1436 &csis->clk_frequency)) in mipi_csis_parse_dt()
1437 csis->clk_frequency = DEFAULT_SCLK_CSIS_FREQ; in mipi_csis_parse_dt()
1444 struct device *dev = &pdev->dev; in mipi_csis_probe()
1451 return -ENOMEM; in mipi_csis_probe()
1453 mutex_init(&csis->lock); in mipi_csis_probe()
1454 spin_lock_init(&csis->slock); in mipi_csis_probe()
1456 csis->dev = dev; in mipi_csis_probe()
1457 csis->info = of_device_get_match_data(dev); in mipi_csis_probe()
1459 memcpy(csis->events, mipi_csis_events, sizeof(csis->events)); in mipi_csis_probe()
1469 csis->regs = devm_platform_ioremap_resource(pdev, 0); in mipi_csis_probe()
1470 if (IS_ERR(csis->regs)) in mipi_csis_probe()
1471 return PTR_ERR(csis->regs); in mipi_csis_probe()
1490 dev_err(csis->dev, "failed to enable clocks: %d\n", ret); in mipi_csis_probe()
1507 platform_set_drvdata(pdev, &csis->sd); in mipi_csis_probe()
1527 csis->bus.num_data_lanes, csis->clk_frequency); in mipi_csis_probe()
1534 media_entity_cleanup(&csis->sd.entity); in mipi_csis_probe()
1535 v4l2_async_nf_unregister(&csis->notifier); in mipi_csis_probe()
1536 v4l2_async_nf_cleanup(&csis->notifier); in mipi_csis_probe()
1537 v4l2_async_unregister_subdev(&csis->sd); in mipi_csis_probe()
1540 fwnode_handle_put(csis->sd.fwnode); in mipi_csis_probe()
1541 mutex_destroy(&csis->lock); in mipi_csis_probe()
1552 v4l2_async_nf_unregister(&csis->notifier); in mipi_csis_remove()
1553 v4l2_async_nf_cleanup(&csis->notifier); in mipi_csis_remove()
1554 v4l2_async_unregister_subdev(&csis->sd); in mipi_csis_remove()
1556 pm_runtime_disable(&pdev->dev); in mipi_csis_remove()
1557 mipi_csis_runtime_suspend(&pdev->dev); in mipi_csis_remove()
1559 media_entity_cleanup(&csis->sd.entity); in mipi_csis_remove()
1560 fwnode_handle_put(csis->sd.fwnode); in mipi_csis_remove()
1561 mutex_destroy(&csis->lock); in mipi_csis_remove()
1562 pm_runtime_set_suspended(&pdev->dev); in mipi_csis_remove()
1569 .compatible = "fsl,imx7-mipi-csi2",
1575 .compatible = "fsl,imx8mm-mipi-csi2",
1597 MODULE_DESCRIPTION("i.MX7 & i.MX8 MIPI CSI-2 receiver driver");
1599 MODULE_ALIAS("platform:imx-mipi-csi2");