csi 132 arch/arm/mach-omap2/control.c u32 csi; csi 471 arch/arm/mach-omap2/control.c control_context.csi = omap_ctrl_readl(OMAP343X_CONTROL_CSI); csi 529 arch/arm/mach-omap2/control.c omap_ctrl_writel(control_context.csi, OMAP343X_CONTROL_CSI); csi 141 arch/ia64/kernel/topology.c pal_cache_shared_info_t csi; csi 154 arch/ia64/kernel/topology.c &csi) != PAL_STATUS_SUCCESS) csi 157 arch/ia64/kernel/topology.c num_shared = (int) csi.num_shared; csi 161 arch/ia64/kernel/topology.c && cpu_data(j)->core_id == csi.log1_cid csi 162 arch/ia64/kernel/topology.c && cpu_data(j)->thread_id == csi.log1_tid) csi 170 arch/ia64/kernel/topology.c &csi) == PAL_STATUS_SUCCESS); csi 79 drivers/clk/imx/clk-imx31.c clk[csi] = imx_clk_mux("csi_sel", base + MXC_CCM_CCMR, 25, 1, csi_sel, ARRAY_SIZE(csi_sel)); csi 128 drivers/clk/imx/clk-imx31.c clk_set_parent(clk[csi], clk[upll]); csi 919 drivers/edac/ppc4xx_edac.c struct csrow_info *csi = mci->csrows[row]; csi 971 drivers/edac/ppc4xx_edac.c for (j = 0; j < csi->nr_channels; j++) { csi 972 drivers/edac/ppc4xx_edac.c struct dimm_info *dimm = csi->channels[j]->dimm; csi 974 drivers/edac/ppc4xx_edac.c dimm->nr_pages = nr_pages / csi->nr_channels; csi 772 drivers/edac/synopsys_edac.c struct csrow_info *csi; csi 780 drivers/edac/synopsys_edac.c csi = mci->csrows[row]; csi 783 drivers/edac/synopsys_edac.c for (j = 0; j < csi->nr_channels; j++) { csi 784 drivers/edac/synopsys_edac.c dimm = csi->channels[j]->dimm; csi 787 drivers/edac/synopsys_edac.c dimm->nr_pages = (size >> PAGE_SHIFT) / csi->nr_channels; csi 1171 drivers/gpu/ipu-v3/ipu-common.c .csi = 0, csi 1178 drivers/gpu/ipu-v3/ipu-common.c .csi = 1, csi 177 drivers/gpu/ipu-v3/ipu-csi.c static inline u32 ipu_csi_read(struct ipu_csi *csi, unsigned offset) csi 179 drivers/gpu/ipu-v3/ipu-csi.c return readl(csi->base + offset); csi 182 drivers/gpu/ipu-v3/ipu-csi.c static inline void ipu_csi_write(struct ipu_csi *csi, u32 value, csi 185 drivers/gpu/ipu-v3/ipu-csi.c writel(value, csi->base + offset); csi 192 drivers/gpu/ipu-v3/ipu-csi.c static int ipu_csi_set_testgen_mclk(struct ipu_csi *csi, u32 pixel_clk, csi 201 drivers/gpu/ipu-v3/ipu-csi.c dev_err(csi->ipu->dev, csi 206 drivers/gpu/ipu-v3/ipu-csi.c temp = ipu_csi_read(csi, CSI_SENS_CONF); csi 208 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, temp | (div_ratio << CSI_SENS_CONF_DIVRATIO_SHIFT), csi 378 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_set_bt_interlaced_codes(struct ipu_csi *csi, csi 409 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0x40596 | CSI_CCIR_ERR_DET_EN, csi 411 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0xD07DF, CSI_CCIR_CODE_2); csi 413 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "capture field swap\n"); csi 416 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0xD07DF | CSI_CCIR_ERR_DET_EN, csi 418 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0x40596, CSI_CCIR_CODE_2); csi 421 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0xFF0000, CSI_CCIR_CODE_3); csi 427 drivers/gpu/ipu-v3/ipu-csi.c int ipu_csi_init_interface(struct ipu_csi *csi, csi 461 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 463 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, data, CSI_SENS_CONF); csi 469 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0x40030, CSI_CCIR_CODE_1); csi 470 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0xFF0000, CSI_CCIR_CODE_3); csi 480 drivers/gpu/ipu-v3/ipu-csi.c dev_err(csi->ipu->dev, csi 486 drivers/gpu/ipu-v3/ipu-csi.c ret = ipu_csi_set_bt_interlaced_codes(csi, infmt, outfmt, std); csi 494 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0x40030 | CSI_CCIR_ERR_DET_EN, csi 496 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0xFF0000, CSI_CCIR_CODE_3); csi 500 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, 0, CSI_CCIR_CODE_1); csi 505 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, (width - 1) | ((height - 1) << 16), csi 508 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_SENS_CONF = 0x%08X\n", csi 509 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_SENS_CONF)); csi 510 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_ACT_FRM_SIZE = 0x%08X\n", csi 511 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_ACT_FRM_SIZE)); csi 514 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 520 drivers/gpu/ipu-v3/ipu-csi.c bool ipu_csi_is_interlaced(struct ipu_csi *csi) csi 525 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 527 drivers/gpu/ipu-v3/ipu-csi.c (ipu_csi_read(csi, CSI_SENS_CONF) & csi 530 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 544 drivers/gpu/ipu-v3/ipu-csi.c dev_err(csi->ipu->dev, csi 545 drivers/gpu/ipu-v3/ipu-csi.c "CSI %d sensor protocol unsupported\n", csi->id); csi 551 drivers/gpu/ipu-v3/ipu-csi.c void ipu_csi_get_window(struct ipu_csi *csi, struct v4l2_rect *w) csi 556 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 558 drivers/gpu/ipu-v3/ipu-csi.c reg = ipu_csi_read(csi, CSI_ACT_FRM_SIZE); csi 562 drivers/gpu/ipu-v3/ipu-csi.c reg = ipu_csi_read(csi, CSI_OUT_FRM_CTRL); csi 566 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 570 drivers/gpu/ipu-v3/ipu-csi.c void ipu_csi_set_window(struct ipu_csi *csi, struct v4l2_rect *w) csi 575 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 577 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, (w->width - 1) | ((w->height - 1) << 16), csi 580 drivers/gpu/ipu-v3/ipu-csi.c reg = ipu_csi_read(csi, CSI_OUT_FRM_CTRL); csi 583 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, reg, CSI_OUT_FRM_CTRL); csi 585 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 589 drivers/gpu/ipu-v3/ipu-csi.c void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert) csi 594 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 596 drivers/gpu/ipu-v3/ipu-csi.c reg = ipu_csi_read(csi, CSI_OUT_FRM_CTRL); csi 600 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, reg, CSI_OUT_FRM_CTRL); csi 602 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 606 drivers/gpu/ipu-v3/ipu-csi.c void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active, csi 611 drivers/gpu/ipu-v3/ipu-csi.c u32 ipu_clk = clk_get_rate(csi->clk_ipu); csi 614 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 616 drivers/gpu/ipu-v3/ipu-csi.c temp = ipu_csi_read(csi, CSI_TST_CTRL); csi 620 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, temp, CSI_TST_CTRL); csi 623 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_set_testgen_mclk(csi, pix_clk, ipu_clk); csi 631 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, temp, CSI_TST_CTRL); csi 634 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 638 drivers/gpu/ipu-v3/ipu-csi.c int ipu_csi_set_mipi_datatype(struct ipu_csi *csi, u32 vc, csi 653 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 655 drivers/gpu/ipu-v3/ipu-csi.c temp = ipu_csi_read(csi, CSI_MIPI_DI); csi 658 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, temp, CSI_MIPI_DI); csi 660 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 666 drivers/gpu/ipu-v3/ipu-csi.c int ipu_csi_set_skip_smfc(struct ipu_csi *csi, u32 skip, csi 675 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 677 drivers/gpu/ipu-v3/ipu-csi.c temp = ipu_csi_read(csi, CSI_SKIP); csi 683 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, temp, CSI_SKIP); csi 685 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 691 drivers/gpu/ipu-v3/ipu-csi.c int ipu_csi_set_dest(struct ipu_csi *csi, enum ipu_csi_dest csi_dest) csi 701 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 703 drivers/gpu/ipu-v3/ipu-csi.c csi_sens_conf = ipu_csi_read(csi, CSI_SENS_CONF); csi 706 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_write(csi, csi_sens_conf, CSI_SENS_CONF); csi 708 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 714 drivers/gpu/ipu-v3/ipu-csi.c int ipu_csi_enable(struct ipu_csi *csi) csi 716 drivers/gpu/ipu-v3/ipu-csi.c ipu_module_enable(csi->ipu, csi->module); csi 722 drivers/gpu/ipu-v3/ipu-csi.c int ipu_csi_disable(struct ipu_csi *csi) csi 724 drivers/gpu/ipu-v3/ipu-csi.c ipu_module_disable(csi->ipu, csi->module); csi 733 drivers/gpu/ipu-v3/ipu-csi.c struct ipu_csi *csi, *ret; csi 738 drivers/gpu/ipu-v3/ipu-csi.c csi = ipu->csi_priv[id]; csi 739 drivers/gpu/ipu-v3/ipu-csi.c ret = csi; csi 741 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 743 drivers/gpu/ipu-v3/ipu-csi.c if (csi->inuse) { csi 748 drivers/gpu/ipu-v3/ipu-csi.c csi->inuse = true; csi 750 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 755 drivers/gpu/ipu-v3/ipu-csi.c void ipu_csi_put(struct ipu_csi *csi) csi 759 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_irqsave(&csi->lock, flags); csi 760 drivers/gpu/ipu-v3/ipu-csi.c csi->inuse = false; csi 761 drivers/gpu/ipu-v3/ipu-csi.c spin_unlock_irqrestore(&csi->lock, flags); csi 768 drivers/gpu/ipu-v3/ipu-csi.c struct ipu_csi *csi; csi 773 drivers/gpu/ipu-v3/ipu-csi.c csi = devm_kzalloc(dev, sizeof(*csi), GFP_KERNEL); csi 774 drivers/gpu/ipu-v3/ipu-csi.c if (!csi) csi 777 drivers/gpu/ipu-v3/ipu-csi.c ipu->csi_priv[id] = csi; csi 779 drivers/gpu/ipu-v3/ipu-csi.c spin_lock_init(&csi->lock); csi 780 drivers/gpu/ipu-v3/ipu-csi.c csi->module = module; csi 781 drivers/gpu/ipu-v3/ipu-csi.c csi->id = id; csi 782 drivers/gpu/ipu-v3/ipu-csi.c csi->clk_ipu = clk_ipu; csi 783 drivers/gpu/ipu-v3/ipu-csi.c csi->base = devm_ioremap(dev, base, PAGE_SIZE); csi 784 drivers/gpu/ipu-v3/ipu-csi.c if (!csi->base) csi 788 drivers/gpu/ipu-v3/ipu-csi.c id, base, csi->base); csi 789 drivers/gpu/ipu-v3/ipu-csi.c csi->ipu = ipu; csi 798 drivers/gpu/ipu-v3/ipu-csi.c void ipu_csi_dump(struct ipu_csi *csi) csi 800 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_SENS_CONF: %08x\n", csi 801 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_SENS_CONF)); csi 802 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_SENS_FRM_SIZE: %08x\n", csi 803 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_SENS_FRM_SIZE)); csi 804 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_ACT_FRM_SIZE: %08x\n", csi 805 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_ACT_FRM_SIZE)); csi 806 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_OUT_FRM_CTRL: %08x\n", csi 807 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_OUT_FRM_CTRL)); csi 808 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_TST_CTRL: %08x\n", csi 809 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_TST_CTRL)); csi 810 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_CCIR_CODE_1: %08x\n", csi 811 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_CCIR_CODE_1)); csi 812 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_CCIR_CODE_2: %08x\n", csi 813 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_CCIR_CODE_2)); csi 814 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_CCIR_CODE_3: %08x\n", csi 815 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_CCIR_CODE_3)); csi 816 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_MIPI_DI: %08x\n", csi 817 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_MIPI_DI)); csi 818 drivers/gpu/ipu-v3/ipu-csi.c dev_dbg(csi->ipu->dev, "CSI_SKIP: %08x\n", csi 819 drivers/gpu/ipu-v3/ipu-csi.c ipu_csi_read(csi, CSI_SKIP)); csi 61 drivers/media/platform/rcar-vin/rcar-core.c if (group->csi[i].subdev == sd) csi 76 drivers/media/platform/rcar-vin/rcar-core.c route->csi == csi_id && csi 80 drivers/media/platform/rcar-vin/rcar-core.c route->vin, route->csi, route->channel); csi 717 drivers/media/platform/rcar-vin/rcar-core.c if (!vin->group->csi[route->csi].subdev) csi 720 drivers/media/platform/rcar-vin/rcar-core.c source = &vin->group->csi[route->csi].subdev->entity; csi 757 drivers/media/platform/rcar-vin/rcar-core.c if (vin->group->csi[i].fwnode != asd->match.fwnode) csi 759 drivers/media/platform/rcar-vin/rcar-core.c vin->group->csi[i].subdev = NULL; csi 777 drivers/media/platform/rcar-vin/rcar-core.c if (vin->group->csi[i].fwnode != asd->match.fwnode) csi 779 drivers/media/platform/rcar-vin/rcar-core.c vin->group->csi[i].subdev = subdev; csi 813 drivers/media/platform/rcar-vin/rcar-core.c if (vin->group->csi[vep->base.id].fwnode) { csi 820 drivers/media/platform/rcar-vin/rcar-core.c vin->group->csi[vep->base.id].fwnode = asd->match.fwnode; csi 948 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, csi 949 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) }, csi 950 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) }, csi 951 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) }, csi 952 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) }, csi 953 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, csi 954 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) }, csi 955 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 2, .mask = BIT(0) }, csi 956 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, csi 957 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) }, csi 958 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, csi 959 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) }, csi 960 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, csi 961 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) | BIT(2) }, csi 962 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, csi 963 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) }, csi 964 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, csi 965 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) }, csi 966 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 4, .mask = BIT(2) }, csi 967 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) }, csi 968 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) }, csi 969 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) }, csi 970 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) }, csi 971 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 6, .mask = BIT(0) }, csi 972 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) }, csi 973 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) }, csi 974 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) }, csi 975 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) }, csi 976 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) }, csi 977 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) | BIT(2) }, csi 978 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) }, csi 979 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) }, csi 992 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, csi 993 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) }, csi 994 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 0, .vin = 0, .mask = BIT(2) | BIT(5) }, csi 995 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) }, csi 996 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 0, .vin = 1, .mask = BIT(1) }, csi 997 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, csi 998 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(3) }, csi 999 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) }, csi 1000 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 1, .vin = 1, .mask = BIT(5) }, csi 1001 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 0, .vin = 2, .mask = BIT(0) }, csi 1002 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, csi 1003 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) }, csi 1004 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, csi 1005 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) }, csi 1006 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 2, .vin = 2, .mask = BIT(5) }, csi 1007 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, csi 1008 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) }, csi 1009 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 1, .vin = 3, .mask = BIT(2) }, csi 1010 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, csi 1011 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) }, csi 1012 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 3, .vin = 3, .mask = BIT(5) }, csi 1013 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, csi 1014 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) }, csi 1015 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 0, .vin = 4, .mask = BIT(2) | BIT(5) }, csi 1016 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) }, csi 1017 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 0, .vin = 5, .mask = BIT(1) }, csi 1018 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) }, csi 1019 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(3) }, csi 1020 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) }, csi 1021 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 1, .vin = 5, .mask = BIT(5) }, csi 1022 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 0, .vin = 6, .mask = BIT(0) }, csi 1023 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) }, csi 1024 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) }, csi 1025 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) }, csi 1026 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) }, csi 1027 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 2, .vin = 6, .mask = BIT(5) }, csi 1028 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) }, csi 1029 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) }, csi 1030 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 1, .vin = 7, .mask = BIT(2) }, csi 1031 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) }, csi 1032 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) }, csi 1033 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI21, .channel = 3, .vin = 7, .mask = BIT(5) }, csi 1046 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, csi 1047 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) }, csi 1048 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) }, csi 1049 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, csi 1050 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(3) }, csi 1051 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) }, csi 1052 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, csi 1053 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) }, csi 1054 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, csi 1055 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) }, csi 1056 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, csi 1057 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) }, csi 1058 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, csi 1059 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) }, csi 1060 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, csi 1061 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) }, csi 1062 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) }, csi 1063 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 5, .mask = BIT(2) }, csi 1064 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 5, .mask = BIT(3) }, csi 1065 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) }, csi 1066 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 6, .mask = BIT(1) }, csi 1067 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) }, csi 1068 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 6, .mask = BIT(3) }, csi 1069 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) }, csi 1070 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 7, .mask = BIT(0) }, csi 1071 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) }, csi 1072 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 7, .mask = BIT(3) }, csi 1073 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) }, csi 1086 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, csi 1087 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 0, .mask = BIT(1) | BIT(4) }, csi 1088 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) }, csi 1089 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 1, .mask = BIT(0) }, csi 1090 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) }, csi 1091 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, csi 1092 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 1, .mask = BIT(4) }, csi 1093 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 2, .mask = BIT(0) }, csi 1094 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, csi 1095 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 2, .mask = BIT(2) }, csi 1096 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, csi 1097 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 2, .mask = BIT(4) }, csi 1098 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, csi 1099 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 3, .mask = BIT(1) | BIT(2) }, csi 1100 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, csi 1101 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 3, .mask = BIT(4) }, csi 1102 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, csi 1103 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 4, .mask = BIT(1) | BIT(4) }, csi 1104 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 4, .mask = BIT(2) }, csi 1105 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 5, .mask = BIT(0) }, csi 1106 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) }, csi 1107 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 5, .mask = BIT(2) }, csi 1108 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 5, .mask = BIT(4) }, csi 1109 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 6, .mask = BIT(0) }, csi 1110 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 6, .mask = BIT(1) }, csi 1111 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 0, .vin = 6, .mask = BIT(2) }, csi 1112 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 6, .mask = BIT(3) }, csi 1113 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 2, .vin = 6, .mask = BIT(4) }, csi 1114 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 7, .mask = BIT(0) }, csi 1115 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 1, .vin = 7, .mask = BIT(1) | BIT(2) }, csi 1116 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 7, .mask = BIT(3) }, csi 1117 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI20, .channel = 3, .vin = 7, .mask = BIT(4) }, csi 1130 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, csi 1131 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, csi 1132 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(3) }, csi 1133 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, csi 1134 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, csi 1135 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, csi 1136 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, csi 1149 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 0, .mask = BIT(0) | BIT(3) }, csi 1150 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 0, .mask = BIT(2) }, csi 1151 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 1, .mask = BIT(2) }, csi 1152 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 1, .mask = BIT(1) | BIT(3) }, csi 1153 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 2, .mask = BIT(1) }, csi 1154 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 2, .vin = 2, .mask = BIT(3) }, csi 1155 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 3, .mask = BIT(0) }, csi 1156 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 3, .vin = 3, .mask = BIT(3) }, csi 1157 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, csi 1158 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 4, .mask = BIT(2) }, csi 1159 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 5, .mask = BIT(2) }, csi 1160 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) }, csi 1161 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 0, .vin = 6, .mask = BIT(1) }, csi 1162 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 2, .vin = 6, .mask = BIT(3) }, csi 1163 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 1, .vin = 7, .mask = BIT(0) }, csi 1164 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI41, .channel = 3, .vin = 7, .mask = BIT(3) }, csi 1177 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 4, .mask = BIT(0) | BIT(3) }, csi 1178 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 0, .vin = 5, .mask = BIT(2) }, csi 1179 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 4, .mask = BIT(2) }, csi 1180 drivers/media/platform/rcar-vin/rcar-core.c { .csi = RVIN_CSI40, .channel = 1, .vin = 5, .mask = BIT(1) | BIT(3) }, csi 119 drivers/media/platform/rcar-vin/rcar-vin.h enum rvin_csi_id csi; csi 258 drivers/media/platform/rcar-vin/rcar-vin.h } csi[RVIN_CSI_MAX]; csi 40 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct sun4i_csi *csi = container_of(notifier, struct sun4i_csi, csi 43 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->src_subdev = subdev; csi 44 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->src_pad = media_entity_get_fwnode_pad(&subdev->entity, csi 47 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (csi->src_pad < 0) { csi 48 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c dev_err(csi->dev, "Couldn't find output pad for subdev %s\n", csi 50 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c return csi->src_pad; csi 53 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c dev_dbg(csi->dev, "Bound %s pad: %d\n", subdev->name, csi->src_pad); csi 59 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct sun4i_csi *csi = container_of(notifier, struct sun4i_csi, csi 61 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct v4l2_subdev *subdev = &csi->subdev; csi 62 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct video_device *vdev = &csi->vdev; csi 65 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = v4l2_device_register_subdev(&csi->v4l, subdev); csi 69 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = sun4i_csi_v4l2_register(csi); csi 73 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = media_device_register(&csi->mdev); csi 85 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = media_create_pad_link(&csi->src_subdev->entity, csi->src_pad, csi 92 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = v4l2_device_register_subdev_nodes(&csi->v4l); csi 99 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c media_device_unregister(&csi->mdev); csi 109 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c static int sun4i_csi_notifier_init(struct sun4i_csi *csi) csi 117 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c v4l2_async_notifier_init(&csi->notifier); csi 119 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ep = fwnode_graph_get_endpoint_by_id(dev_fwnode(csi->dev), 0, 0, csi 128 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->bus = vep.bus.parallel; csi 130 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = v4l2_async_notifier_add_fwnode_remote_subdev(&csi->notifier, csi 131 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ep, &csi->asd); csi 135 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->notifier.ops = &sun4i_csi_notify_ops; csi 146 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct sun4i_csi *csi; csi 151 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi = devm_kzalloc(&pdev->dev, sizeof(*csi), GFP_KERNEL); csi 152 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (!csi) csi 154 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c platform_set_drvdata(pdev, csi); csi 155 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->dev = &pdev->dev; csi 156 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c subdev = &csi->subdev; csi 157 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c vdev = &csi->vdev; csi 170 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (of_find_property(csi->dev->of_node, "interconnects", NULL)) { csi 171 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = of_dma_configure(csi->dev, csi->dev->of_node, true); csi 176 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->dev->dma_pfn_offset = PHYS_PFN_OFFSET; csi 180 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->mdev.dev = csi->dev; csi 181 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c strscpy(csi->mdev.model, "Allwinner Video Capture Device", csi 182 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c sizeof(csi->mdev.model)); csi 183 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->mdev.hw_revision = 0; csi 184 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c media_device_init(&csi->mdev); csi 185 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->v4l.mdev = &csi->mdev; csi 188 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->regs = devm_ioremap_resource(&pdev->dev, res); csi 189 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (IS_ERR(csi->regs)) csi 190 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c return PTR_ERR(csi->regs); csi 196 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->bus_clk = devm_clk_get(&pdev->dev, "bus"); csi 197 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (IS_ERR(csi->bus_clk)) { csi 199 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c return PTR_ERR(csi->bus_clk); csi 202 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->isp_clk = devm_clk_get(&pdev->dev, "isp"); csi 203 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (IS_ERR(csi->isp_clk)) { csi 205 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c return PTR_ERR(csi->isp_clk); csi 208 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->ram_clk = devm_clk_get(&pdev->dev, "ram"); csi 209 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (IS_ERR(csi->ram_clk)) { csi 211 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c return PTR_ERR(csi->ram_clk); csi 214 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->rst = devm_reset_control_get(&pdev->dev, NULL); csi 215 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c if (IS_ERR(csi->rst)) { csi 217 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c return PTR_ERR(csi->rst); csi 226 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c v4l2_set_subdevdata(subdev, csi); csi 228 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->subdev_pads[CSI_SUBDEV_SINK].flags = csi 230 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->subdev_pads[CSI_SUBDEV_SOURCE].flags = MEDIA_PAD_FL_SOURCE; csi 232 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->subdev_pads); csi 236 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c csi->vdev_pad.flags = MEDIA_PAD_FL_SINK | MEDIA_PAD_FL_MUST_CONNECT; csi 238 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = media_entity_pads_init(&vdev->entity, 1, &csi->vdev_pad); csi 242 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = sun4i_csi_dma_register(csi, irq); csi 246 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = sun4i_csi_notifier_init(csi); csi 250 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c ret = v4l2_async_notifier_register(&csi->v4l, &csi->notifier); csi 252 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c dev_err(csi->dev, "Couldn't register our notifier.\n"); csi 261 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c media_device_unregister(&csi->mdev); csi 262 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c sun4i_csi_dma_unregister(csi); csi 265 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c media_device_cleanup(&csi->mdev); csi 272 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct sun4i_csi *csi = platform_get_drvdata(pdev); csi 274 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c v4l2_async_notifier_unregister(&csi->notifier); csi 275 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c v4l2_async_notifier_cleanup(&csi->notifier); csi 276 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c media_device_unregister(&csi->mdev); csi 277 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c sun4i_csi_dma_unregister(csi); csi 278 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c media_device_cleanup(&csi->mdev); csi 291 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct sun4i_csi *csi = dev_get_drvdata(dev); csi 293 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c reset_control_deassert(csi->rst); csi 294 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_prepare_enable(csi->bus_clk); csi 295 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_prepare_enable(csi->ram_clk); csi 296 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_set_rate(csi->isp_clk, 80000000); csi 297 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_prepare_enable(csi->isp_clk); csi 299 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c writel(1, csi->regs + CSI_EN_REG); csi 306 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c struct sun4i_csi *csi = dev_get_drvdata(dev); csi 308 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_disable_unprepare(csi->isp_clk); csi 309 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_disable_unprepare(csi->ram_clk); csi 310 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c clk_disable_unprepare(csi->bus_clk); csi 312 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c reset_control_assert(csi->rst); csi 155 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h int sun4i_csi_dma_register(struct sun4i_csi *csi, int irq); csi 156 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h void sun4i_csi_dma_unregister(struct sun4i_csi *csi); csi 158 drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.h int sun4i_csi_v4l2_register(struct sun4i_csi *csi); csi 36 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static void sun4i_csi_capture_start(struct sun4i_csi *csi) csi 38 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(CSI_CPT_CTRL_VIDEO_START, csi->regs + CSI_CPT_CTRL_REG); csi 41 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static void sun4i_csi_capture_stop(struct sun4i_csi *csi) csi 43 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(0, csi->regs + CSI_CPT_CTRL_REG); csi 52 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct sun4i_csi *csi = vb2_get_drv_priv(vq); csi 53 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c unsigned int num_planes = csi->fmt.num_planes; csi 61 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c if (sizes[i] < csi->fmt.plane_fmt[i].sizeimage) csi 68 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c sizes[i] = csi->fmt.plane_fmt[i].sizeimage; csi 75 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct sun4i_csi *csi = vb2_get_drv_priv(vb->vb2_queue); csi 78 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c for (i = 0; i < csi->fmt.num_planes; i++) { csi 79 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c unsigned long size = csi->fmt.plane_fmt[i].sizeimage; csi 82 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_err(csi->dev, "buffer too small (%lu < %lu)\n", csi 93 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static int sun4i_csi_setup_scratch_buffer(struct sun4i_csi *csi, csi 96 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dma_addr_t addr = csi->scratch.paddr; csi 99 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_dbg(csi->dev, csi 102 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c for (plane = 0; plane < csi->fmt.num_planes; plane++) { csi 103 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(addr, csi->regs + CSI_BUF_ADDR_REG(plane, slot)); csi 104 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c addr += csi->fmt.plane_fmt[plane].sizeimage; csi 107 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->current_buf[slot] = NULL; csi 111 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static int sun4i_csi_buffer_fill_slot(struct sun4i_csi *csi, unsigned int slot) csi 121 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c if (WARN_ON(csi->current_buf[slot])) csi 124 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c if (list_empty(&csi->buf_list)) csi 125 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c return sun4i_csi_setup_scratch_buffer(csi, slot); csi 127 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c c_buf = list_first_entry(&csi->buf_list, struct sun4i_csi_buffer, list); csi 131 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->current_buf[slot] = v_buf; csi 133 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c for (plane = 0; plane < csi->fmt.num_planes; plane++) { csi 138 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(buf_addr, csi->regs + CSI_BUF_ADDR_REG(plane, slot)); csi 144 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static int sun4i_csi_buffer_fill_all(struct sun4i_csi *csi) csi 150 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c ret = sun4i_csi_buffer_fill_slot(csi, slot); csi 158 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static void sun4i_csi_buffer_mark_done(struct sun4i_csi *csi, csi 164 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c if (!csi->current_buf[slot]) { csi 165 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_dbg(csi->dev, "Scratch buffer was used, ignoring..\n"); csi 169 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c v_buf = csi->current_buf[slot]; csi 170 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c v_buf->field = csi->fmt.field; csi 175 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->current_buf[slot] = NULL; csi 178 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static int sun4i_csi_buffer_flip(struct sun4i_csi *csi, unsigned int sequence) csi 180 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c u32 reg = readl(csi->regs + CSI_BUF_CTRL_REG); csi 187 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c sun4i_csi_buffer_mark_done(csi, next, sequence); csi 190 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c return sun4i_csi_buffer_fill_slot(csi, next); csi 195 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct sun4i_csi *csi = vb2_get_drv_priv(vb->vb2_queue); csi 199 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_lock_irqsave(&csi->qlock, flags); csi 200 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c list_add_tail(&buf->list, &csi->buf_list); csi 201 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_unlock_irqrestore(&csi->qlock, flags); csi 204 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c static void return_all_buffers(struct sun4i_csi *csi, csi 210 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c list_for_each_entry_safe(buf, node, &csi->buf_list, list) { csi 216 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct vb2_v4l2_buffer *v_buf = csi->current_buf[slot]; csi 222 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->current_buf[slot] = NULL; csi 228 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct sun4i_csi *csi = vb2_get_drv_priv(vq); csi 229 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct v4l2_fwnode_bus_parallel *bus = &csi->bus; csi 236 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi_fmt = sun4i_csi_find_format(&csi->fmt.pixelformat, NULL); csi 240 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_dbg(csi->dev, "Starting capture\n"); csi 242 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->sequence = 0; csi 255 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->scratch.size = 0; csi 256 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c for (i = 0; i < csi->fmt.num_planes; i++) csi 257 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->scratch.size += csi->fmt.plane_fmt[i].sizeimage; csi 259 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->scratch.vaddr = dma_alloc_coherent(csi->dev, csi 260 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->scratch.size, csi 261 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c &csi->scratch.paddr, csi 263 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c if (!csi->scratch.vaddr) { csi 264 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_err(csi->dev, "Failed to allocate scratch buffer\n"); csi 269 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c ret = media_pipeline_start(&csi->vdev.entity, &csi->vdev.pipe); csi 273 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_lock_irqsave(&csi->qlock, flags); csi 276 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(CSI_WIN_CTRL_W_ACTIVE(csi->fmt.width * 2), csi 277 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->regs + CSI_WIN_CTRL_W_REG); csi 278 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(CSI_WIN_CTRL_H_ACTIVE(csi->fmt.height), csi 279 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->regs + CSI_WIN_CTRL_H_REG); csi 297 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->regs + CSI_CFG_REG); csi 300 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(csi->fmt.plane_fmt[0].bytesperline, csi 301 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->regs + CSI_BUF_LEN_REG); csi 304 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c ret = sun4i_csi_buffer_fill_all(csi); csi 306 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_unlock_irqrestore(&csi->qlock, flags); csi 311 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(CSI_BUF_CTRL_DBE, csi->regs + CSI_BUF_CTRL_REG); csi 314 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(CSI_INT_FRM_DONE, csi->regs + 0x34); csi 317 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(CSI_INT_FRM_DONE, csi->regs + CSI_INT_EN_REG); csi 319 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c sun4i_csi_capture_start(csi); csi 321 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_unlock_irqrestore(&csi->qlock, flags); csi 323 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c ret = v4l2_subdev_call(csi->src_subdev, video, s_stream, 1); csi 330 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c sun4i_csi_capture_stop(csi); csi 333 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c media_pipeline_stop(&csi->vdev.entity); csi 336 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dma_free_coherent(csi->dev, csi->scratch.size, csi->scratch.vaddr, csi 337 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->scratch.paddr); csi 340 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_lock_irqsave(&csi->qlock, flags); csi 341 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c return_all_buffers(csi, VB2_BUF_STATE_QUEUED); csi 342 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_unlock_irqrestore(&csi->qlock, flags); csi 349 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct sun4i_csi *csi = vb2_get_drv_priv(vq); csi 352 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_dbg(csi->dev, "Stopping capture\n"); csi 354 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c v4l2_subdev_call(csi->src_subdev, video, s_stream, 0); csi 355 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c sun4i_csi_capture_stop(csi); csi 358 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_lock_irqsave(&csi->qlock, flags); csi 359 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c return_all_buffers(csi, VB2_BUF_STATE_ERROR); csi 360 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_unlock_irqrestore(&csi->qlock, flags); csi 362 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c media_pipeline_stop(&csi->vdev.entity); csi 364 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dma_free_coherent(csi->dev, csi->scratch.size, csi->scratch.vaddr, csi 365 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->scratch.paddr); csi 380 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct sun4i_csi *csi = data; csi 383 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c reg = readl(csi->regs + CSI_INT_STA_REG); csi 386 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c writel(reg, csi->regs + CSI_INT_STA_REG); csi 391 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_lock(&csi->qlock); csi 392 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c if (sun4i_csi_buffer_flip(csi, csi->sequence++)) { csi 393 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_warn(csi->dev, "%s: Flip failed\n", __func__); csi 394 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c sun4i_csi_capture_stop(csi); csi 396 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_unlock(&csi->qlock); csi 401 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c int sun4i_csi_dma_register(struct sun4i_csi *csi, int irq) csi 403 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c struct vb2_queue *q = &csi->queue; csi 407 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c spin_lock_init(&csi->qlock); csi 408 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c mutex_init(&csi->lock); csi 410 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c INIT_LIST_HEAD(&csi->buf_list); csi 412 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c csi->current_buf[i] = NULL; csi 417 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c q->lock = &csi->lock; csi 418 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c q->drv_priv = csi; csi 423 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c q->dev = csi->dev; csi 427 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_err(csi->dev, "failed to initialize VB2 queue\n"); csi 431 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c ret = v4l2_device_register(csi->dev, &csi->v4l); csi 433 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_err(csi->dev, "Couldn't register the v4l2 device\n"); csi 437 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c ret = devm_request_irq(csi->dev, irq, sun4i_csi_irq, 0, csi 438 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_name(csi->dev), csi); csi 440 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c dev_err(csi->dev, "Couldn't register our interrupt\n"); csi 447 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c v4l2_device_unregister(&csi->v4l); csi 453 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c mutex_destroy(&csi->lock); csi 457 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c void sun4i_csi_dma_unregister(struct sun4i_csi *csi) csi 459 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c v4l2_device_unregister(&csi->v4l); csi 460 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c vb2_queue_release(&csi->queue); csi 461 drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c mutex_destroy(&csi->lock); csi 56 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = video_drvdata(file); csi 61 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c dev_name(csi->dev)); csi 95 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c static void _sun4i_csi_try_fmt(struct sun4i_csi *csi, csi 142 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = video_drvdata(file); csi 144 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c _sun4i_csi_try_fmt(csi, &f->fmt.pix_mp); csi 152 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = video_drvdata(file); csi 154 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c _sun4i_csi_try_fmt(csi, &f->fmt.pix_mp); csi 155 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c csi->fmt = f->fmt.pix_mp; csi 163 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = video_drvdata(file); csi 165 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c f->fmt.pix_mp = csi->fmt; csi 206 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = video_drvdata(file); csi 209 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c ret = mutex_lock_interruptible(&csi->lock); csi 213 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c ret = pm_runtime_get_sync(csi->dev); csi 217 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c ret = v4l2_pipeline_pm_use(&csi->vdev.entity, 1); csi 225 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c mutex_unlock(&csi->lock); csi 230 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c v4l2_pipeline_pm_use(&csi->vdev.entity, 0); csi 233 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c pm_runtime_put(csi->dev); csi 234 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c mutex_unlock(&csi->lock); csi 241 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = video_drvdata(file); csi 243 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c mutex_lock(&csi->lock); csi 246 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c v4l2_pipeline_pm_use(&csi->vdev.entity, 0); csi 247 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c pm_runtime_put(csi->dev); csi 249 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c mutex_unlock(&csi->lock); csi 291 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = container_of(subdev, struct sun4i_csi, subdev); csi 297 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c subdev_fmt = &csi->subdev_fmt; csi 308 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct sun4i_csi *csi = container_of(subdev, struct sun4i_csi, subdev); csi 314 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c subdev_fmt = &csi->subdev_fmt; csi 354 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c int sun4i_csi_v4l2_register(struct sun4i_csi *csi) csi 356 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c struct video_device *vdev = &csi->vdev; csi 360 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c vdev->v4l2_dev = &csi->v4l; csi 361 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c vdev->queue = &csi->queue; csi 364 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c vdev->lock = &csi->lock; csi 367 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c csi->fmt.pixelformat = sun4i_csi_formats[0].fourcc, csi 368 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c csi->fmt.width = CSI_DEFAULT_WIDTH; csi 369 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c csi->fmt.height = CSI_DEFAULT_HEIGHT; csi 370 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c _sun4i_csi_try_fmt(csi, &csi->fmt); csi 371 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c csi->subdev_fmt = sun4i_csi_pad_fmt_default; csi 375 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c video_set_drvdata(vdev, csi); csi 377 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c ret = video_register_device(&csi->vdev, VFL_TYPE_GRABBER, -1); csi 381 drivers/media/platform/sunxi/sun4i-csi/sun4i_v4l2.c dev_info(csi->dev, "Device registered as %s\n", csi 33 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi csi; csi 44 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c static inline struct sun6i_csi_dev *sun6i_csi_to_dev(struct sun6i_csi *csi) csi 46 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c return container_of(csi, struct sun6i_csi_dev, csi); csi 50 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c bool sun6i_csi_is_format_supported(struct sun6i_csi *csi, csi 53 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); csi 60 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c if ((sdev->csi.v4l2_ep.bus_type == V4L2_MBUS_PARALLEL csi 61 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c || sdev->csi.v4l2_ep.bus_type == V4L2_MBUS_BT656) csi 62 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c && sdev->csi.v4l2_ep.bus.parallel.bus_width == 16) { csi 164 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c int sun6i_csi_set_power(struct sun6i_csi *csi, bool enable) csi 166 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); csi 375 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct v4l2_fwnode_endpoint *endpoint = &sdev->csi.v4l2_ep; csi 376 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi *csi = &sdev->csi; csi 382 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c if (csi->config.field == V4L2_FIELD_INTERLACED csi 383 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c || csi->config.field == V4L2_FIELD_INTERLACED_TB csi 384 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c || csi->config.field == V4L2_FIELD_INTERLACED_BT) csi 464 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi *csi = &sdev->csi; csi 475 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c val = get_csi_input_format(sdev, csi->config.code, csi 476 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->config.pixelformat); csi 479 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c val = get_csi_output_format(sdev, csi->config.pixelformat, csi 480 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->config.field); csi 483 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c val = get_csi_input_seq(sdev, csi->config.code, csi 484 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->config.pixelformat); csi 487 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c if (csi->config.field == V4L2_FIELD_TOP) csi 489 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c else if (csi->config.field == V4L2_FIELD_BOTTOM) csi 499 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi_config *config = &sdev->csi.config; csi 571 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c int sun6i_csi_update_config(struct sun6i_csi *csi, csi 574 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); csi 579 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c memcpy(&csi->config, config, sizeof(csi->config)); csi 588 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c void sun6i_csi_update_buf_addr(struct sun6i_csi *csi, dma_addr_t addr) csi 590 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); csi 602 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c void sun6i_csi_set_stream(struct sun6i_csi *csi, bool enable) csi 604 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi); csi 629 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c static int sun6i_csi_link_entity(struct sun6i_csi *csi, csi 640 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_err(csi->dev, "%s: no source pad in external entity %s\n", csi 647 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sink = &csi->video.vdev.entity; csi 648 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sink_pad = &csi->video.pad; csi 650 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_dbg(csi->dev, "creating %s:%u -> %s:%u link\n", csi 657 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_err(csi->dev, "failed to create %s:%u -> %s:%u link\n", csi 668 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi *csi = container_of(notifier, struct sun6i_csi, csi 670 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct v4l2_device *v4l2_dev = &csi->v4l2_dev; csi 674 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_dbg(csi->dev, "notify complete, all subdevs registered\n"); csi 680 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = sun6i_csi_link_entity(csi, &sd->entity, sd->fwnode); csi 684 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = v4l2_device_register_subdev_nodes(&csi->v4l2_dev); csi 688 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c return media_device_register(&csi->media_dev); csi 699 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c struct sun6i_csi *csi = dev_get_drvdata(dev); csi 709 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->v4l2_ep = *vep; csi 717 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c static void sun6i_csi_v4l2_cleanup(struct sun6i_csi *csi) csi 719 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c media_device_unregister(&csi->media_dev); csi 720 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_async_notifier_unregister(&csi->notifier); csi 721 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_async_notifier_cleanup(&csi->notifier); csi 722 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sun6i_video_cleanup(&csi->video); csi 723 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_device_unregister(&csi->v4l2_dev); csi 724 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_ctrl_handler_free(&csi->ctrl_handler); csi 725 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c media_device_cleanup(&csi->media_dev); csi 728 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c static int sun6i_csi_v4l2_init(struct sun6i_csi *csi) csi 732 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->media_dev.dev = csi->dev; csi 733 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c strscpy(csi->media_dev.model, "Allwinner Video Capture Device", csi 734 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sizeof(csi->media_dev.model)); csi 735 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->media_dev.hw_revision = 0; csi 737 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c media_device_init(&csi->media_dev); csi 738 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_async_notifier_init(&csi->notifier); csi 740 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = v4l2_ctrl_handler_init(&csi->ctrl_handler, 0); csi 742 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_err(csi->dev, "V4L2 controls handler init failed (%d)\n", csi 747 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->v4l2_dev.mdev = &csi->media_dev; csi 748 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->v4l2_dev.ctrl_handler = &csi->ctrl_handler; csi 749 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = v4l2_device_register(csi->dev, &csi->v4l2_dev); csi 751 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_err(csi->dev, "V4L2 device registration failed (%d)\n", csi 756 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = sun6i_video_init(&csi->video, csi, "sun6i-csi"); csi 760 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = v4l2_async_notifier_parse_fwnode_endpoints(csi->dev, csi 761 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c &csi->notifier, csi 767 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c csi->notifier.ops = &sun6i_csi_async_ops; csi 769 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c ret = v4l2_async_notifier_register(&csi->v4l2_dev, &csi->notifier); csi 771 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c dev_err(csi->dev, "notifier registration failed\n"); csi 778 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sun6i_video_cleanup(&csi->video); csi 780 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_device_unregister(&csi->v4l2_dev); csi 782 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_ctrl_handler_free(&csi->ctrl_handler); csi 784 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c v4l2_async_notifier_cleanup(&csi->notifier); csi 785 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c media_device_cleanup(&csi->media_dev); csi 816 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sun6i_video_frame_done(&sdev->csi.video); csi 909 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sdev->csi.dev = &pdev->dev; csi 910 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c return sun6i_csi_v4l2_init(&sdev->csi); csi 917 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c sun6i_csi_v4l2_cleanup(&sdev->csi); csi 57 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h bool sun6i_csi_is_format_supported(struct sun6i_csi *csi, u32 pixformat, csi 65 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h int sun6i_csi_set_power(struct sun6i_csi *csi, bool enable); csi 72 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h int sun6i_csi_update_config(struct sun6i_csi *csi, csi 80 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h void sun6i_csi_update_buf_addr(struct sun6i_csi *csi, dma_addr_t addr); csi 87 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.h void sun6i_csi_set_stream(struct sun6i_csi *csi, bool enable); csi 163 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c ret = sun6i_csi_update_config(video->csi, &config); csi 172 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_update_buf_addr(video->csi, buf->dma_addr); csi 174 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_set_stream(video->csi, true); csi 195 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_update_buf_addr(video->csi, next_buf->dma_addr); csi 206 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_set_stream(video->csi, false); csi 230 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_set_stream(video->csi, false); csi 267 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c dev_dbg(video->csi->dev, "Frame dropped!\n"); csi 279 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_update_buf_addr(video->csi, next_buf->dma_addr); csi 280 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c dev_dbg(video->csi->dev, "Frame dropped!\n"); csi 294 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_update_buf_addr(video->csi, next_buf->dma_addr); csi 296 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c dev_dbg(video->csi->dev, "Next frame will be dropped!\n"); csi 322 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c video->csi->dev->of_node->name); csi 485 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c ret = sun6i_csi_set_power(video->csi, true); csi 513 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c sun6i_csi_set_power(video->csi, false); csi 558 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c dev_info(video->csi->dev, csi 567 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c if (!sun6i_csi_is_format_supported(video->csi, csi 570 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c dev_err(video->csi->dev, csi 579 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c dev_err(video->csi->dev, csi 595 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c int sun6i_video_init(struct sun6i_video *video, struct sun6i_csi *csi, csi 603 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c video->csi = csi; csi 638 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c vidq->dev = csi->dev; csi 642 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c v4l2_err(&csi->v4l2_dev, "vb2_queue_init failed: %d\n", ret); csi 653 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c vdev->v4l2_dev = &csi->v4l2_dev; csi 661 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c v4l2_err(&csi->v4l2_dev, csi 19 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h struct sun6i_csi *csi; csi 32 drivers/media/platform/sunxi/sun6i-csi/sun6i_video.h int sun6i_video_init(struct sun6i_video *video, struct sun6i_csi *csi, csi 4380 drivers/net/ethernet/realtek/r8169_main.c u32 csi; csi 4392 drivers/net/ethernet/realtek/r8169_main.c csi = rtl_csi_read(tp, 0x070c) & 0x00ffffff; csi 4393 drivers/net/ethernet/realtek/r8169_main.c rtl_csi_write(tp, 0x070c, csi | val << 24); csi 275 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c bool csi) csi 1566 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c bool csi = false; csi 1871 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c sta, csi); csi 1627 drivers/pinctrl/tegra/pinctrl-tegra124.c FUNCTION(csi), csi 295 drivers/staging/media/imx/imx-ic-prp.c struct v4l2_subdev *csi; csi 303 drivers/staging/media/imx/imx-ic-prp.c csi = imx_media_pipeline_subdev(&ic_priv->sd.entity, csi 305 drivers/staging/media/imx/imx-ic-prp.c if (IS_ERR(csi)) csi 306 drivers/staging/media/imx/imx-ic-prp.c csi = NULL; csi 321 drivers/staging/media/imx/imx-ic-prp.c if (!csi) { csi 327 drivers/staging/media/imx/imx-ic-prp.c if (csi) { csi 328 drivers/staging/media/imx/imx-ic-prp.c switch (csi->grp_id) { csi 74 drivers/staging/media/imx/imx-media-csi.c struct ipu_csi *csi; csi 735 drivers/staging/media/imx/imx-media-csi.c ipu_csi_set_window(priv->csi, &crop); csi 737 drivers/staging/media/imx/imx-media-csi.c ipu_csi_set_downsize(priv->csi, csi 741 drivers/staging/media/imx/imx-media-csi.c ipu_csi_init_interface(priv->csi, &mbus_cfg, &if_fmt, outfmt); csi 743 drivers/staging/media/imx/imx-media-csi.c ipu_csi_set_dest(priv->csi, priv->dest); csi 746 drivers/staging/media/imx/imx-media-csi.c ipu_csi_set_skip_smfc(priv->csi, priv->skip->skip_smfc, csi 749 drivers/staging/media/imx/imx-media-csi.c ipu_csi_dump(priv->csi); csi 784 drivers/staging/media/imx/imx-media-csi.c ret = ipu_csi_enable(priv->csi); csi 813 drivers/staging/media/imx/imx-media-csi.c ipu_csi_disable(priv->csi); csi 1141 drivers/staging/media/imx/imx-media-csi.c ipu_csi_set_mipi_datatype(priv->csi, vc_num, csi 1749 drivers/staging/media/imx/imx-media-csi.c struct ipu_csi *csi; csi 1754 drivers/staging/media/imx/imx-media-csi.c csi = ipu_csi_get(priv->ipu, priv->csi_id); csi 1755 drivers/staging/media/imx/imx-media-csi.c if (IS_ERR(csi)) { csi 1757 drivers/staging/media/imx/imx-media-csi.c return PTR_ERR(csi); csi 1759 drivers/staging/media/imx/imx-media-csi.c priv->csi = csi; csi 1810 drivers/staging/media/imx/imx-media-csi.c ipu_csi_put(priv->csi); csi 1823 drivers/staging/media/imx/imx-media-csi.c if (priv->csi) csi 1824 drivers/staging/media/imx/imx-media-csi.c ipu_csi_put(priv->csi); csi 1944 drivers/staging/media/imx/imx-media-csi.c priv->csi_id = pdata->csi; csi 191 drivers/staging/media/imx/imx-media-internal-sd.c struct v4l2_subdev *csi) csi 193 drivers/staging/media/imx/imx-media-internal-sd.c struct device *ipu_dev = csi->dev->parent; csi 249 drivers/staging/media/imx/imx-media-internal-sd.c if (intsd->grp_id == csi->grp_id) { csi 250 drivers/staging/media/imx/imx-media-internal-sd.c sd = csi; csi 153 drivers/staging/media/imx/imx-media-of.c struct v4l2_subdev *csi) csi 155 drivers/staging/media/imx/imx-media-of.c struct device_node *csi_np = csi->dev->of_node; csi 182 drivers/staging/media/imx/imx-media-of.c ret = create_of_link(imxmd, csi, &link); csi 240 drivers/staging/media/imx/imx-media.h struct v4l2_subdev *csi); csi 249 drivers/staging/media/imx/imx-media.h struct v4l2_subdev *csi); csi 198 drivers/staging/media/imx/imx7-media-csi.c static u32 imx7_csi_reg_read(struct imx7_csi *csi, unsigned int offset) csi 200 drivers/staging/media/imx/imx7-media-csi.c return readl(csi->regbase + offset); csi 203 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_reg_write(struct imx7_csi *csi, unsigned int value, csi 206 drivers/staging/media/imx/imx7-media-csi.c writel(value, csi->regbase + offset); csi 209 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_hw_reset(struct imx7_csi *csi) csi 211 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, csi 212 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_read(csi, CSI_CSICR3) | BIT_FRMCNT_RST, csi 215 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, CSICR1_RESET_VAL, CSI_CSICR1); csi 216 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, CSICR2_RESET_VAL, CSI_CSICR2); csi 217 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, CSICR3_RESET_VAL, CSI_CSICR3); csi 220 drivers/staging/media/imx/imx7-media-csi.c static u32 imx7_csi_irq_clear(struct imx7_csi *csi) csi 224 drivers/staging/media/imx/imx7-media-csi.c isr = imx7_csi_reg_read(csi, CSI_CSISR); csi 225 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, isr, CSI_CSISR); csi 230 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_init_interface(struct imx7_csi *csi) csi 237 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, val, CSI_CSICR1); csi 240 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, imag_para, CSI_CSIIMAG_PARA); csi 243 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, val, CSI_CSICR3); csi 246 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_hw_enable_irq(struct imx7_csi *csi) csi 248 drivers/staging/media/imx/imx7-media-csi.c u32 cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); csi 259 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr1, CSI_CSICR1); csi 262 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_hw_disable_irq(struct imx7_csi *csi) csi 264 drivers/staging/media/imx/imx7-media-csi.c u32 cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); csi 272 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr1, CSI_CSICR1); csi 275 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_hw_enable(struct imx7_csi *csi) csi 277 drivers/staging/media/imx/imx7-media-csi.c u32 cr = imx7_csi_reg_read(csi, CSI_CSICR18); csi 281 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr, CSI_CSICR18); csi 284 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_hw_disable(struct imx7_csi *csi) csi 286 drivers/staging/media/imx/imx7-media-csi.c u32 cr = imx7_csi_reg_read(csi, CSI_CSICR18); csi 290 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr, CSI_CSICR18); csi 293 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_dma_reflash(struct imx7_csi *csi) csi 295 drivers/staging/media/imx/imx7-media-csi.c u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR18); csi 297 drivers/staging/media/imx/imx7-media-csi.c cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); csi 299 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr3, CSI_CSICR3); csi 302 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_rx_fifo_clear(struct imx7_csi *csi) csi 306 drivers/staging/media/imx/imx7-media-csi.c cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); csi 307 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr1 & ~BIT_FCC, CSI_CSICR1); csi 308 drivers/staging/media/imx/imx7-media-csi.c cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); csi 309 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr1 | BIT_CLR_RXFIFO, CSI_CSICR1); csi 311 drivers/staging/media/imx/imx7-media-csi.c cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); csi 312 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr1 | BIT_FCC, CSI_CSICR1); csi 315 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_buf_stride_set(struct imx7_csi *csi, u32 stride) csi 317 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, stride, CSI_CSIFBUF_PARA); csi 320 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_deinterlace_enable(struct imx7_csi *csi, bool enable) csi 322 drivers/staging/media/imx/imx7-media-csi.c u32 cr18 = imx7_csi_reg_read(csi, CSI_CSICR18); csi 329 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr18, CSI_CSICR18); csi 332 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_dmareq_rff_enable(struct imx7_csi *csi) csi 334 drivers/staging/media/imx/imx7-media-csi.c u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); csi 335 drivers/staging/media/imx/imx7-media-csi.c u32 cr2 = imx7_csi_reg_read(csi, CSI_CSICR2); csi 345 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr3, CSI_CSICR3); csi 346 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr2, CSI_CSICR2); csi 349 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_dmareq_rff_disable(struct imx7_csi *csi) csi 351 drivers/staging/media/imx/imx7-media-csi.c u32 cr3 = imx7_csi_reg_read(csi, CSI_CSICR3); csi 355 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr3, CSI_CSICR3); csi 358 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_set_imagpara(struct imx7_csi *csi, int width, int height) csi 364 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, rx_count, CSI_CSIRXCNT); csi 367 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, imag_para, CSI_CSIIMAG_PARA); csi 370 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_reflash(csi); csi 373 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_sw_reset(struct imx7_csi *csi) csi 375 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_disable(csi); csi 377 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_rx_fifo_clear(csi); csi 379 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_reflash(csi); csi 383 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_irq_clear(csi); csi 385 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_enable(csi); csi 388 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_error_recovery(struct imx7_csi *csi) csi 390 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_disable(csi); csi 392 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_rx_fifo_clear(csi); csi 394 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_reflash(csi); csi 396 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_enable(csi); csi 399 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_init(struct imx7_csi *csi) csi 403 drivers/staging/media/imx/imx7-media-csi.c if (csi->is_init) csi 406 drivers/staging/media/imx/imx7-media-csi.c ret = clk_prepare_enable(csi->mclk); csi 409 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_reset(csi); csi 410 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_init_interface(csi); csi 411 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dmareq_rff_enable(csi); csi 413 drivers/staging/media/imx/imx7-media-csi.c csi->is_init = true; csi 418 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_deinit(struct imx7_csi *csi) csi 420 drivers/staging/media/imx/imx7-media-csi.c if (!csi->is_init) csi 423 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_reset(csi); csi 424 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_init_interface(csi); csi 425 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dmareq_rff_disable(csi); csi 426 drivers/staging/media/imx/imx7-media-csi.c clk_disable_unprepare(csi->mclk); csi 428 drivers/staging/media/imx/imx7-media-csi.c csi->is_init = false; csi 431 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_get_upstream_endpoint(struct imx7_csi *csi, csi 440 drivers/staging/media/imx/imx7-media-csi.c if (!csi->src_sd) csi 443 drivers/staging/media/imx/imx7-media-csi.c src = &csi->src_sd->entity; csi 451 drivers/staging/media/imx/imx7-media-csi.c src = &csi->sd.entity; csi 491 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 495 drivers/staging/media/imx/imx7-media-csi.c dev_dbg(csi->dev, "link setup %s -> %s\n", remote->entity->name, csi 498 drivers/staging/media/imx/imx7-media-csi.c mutex_lock(&csi->lock); csi 509 drivers/staging/media/imx/imx7-media-csi.c if (csi->src_sd) { csi 513 drivers/staging/media/imx/imx7-media-csi.c csi->src_sd = remote_sd; csi 515 drivers/staging/media/imx/imx7-media-csi.c csi->src_sd = NULL; csi 523 drivers/staging/media/imx/imx7-media-csi.c if (csi->sink) { csi 527 drivers/staging/media/imx/imx7-media-csi.c csi->sink = remote->entity; csi 529 drivers/staging/media/imx/imx7-media-csi.c v4l2_ctrl_handler_free(&csi->ctrl_hdlr); csi 530 drivers/staging/media/imx/imx7-media-csi.c v4l2_ctrl_handler_init(&csi->ctrl_hdlr, 0); csi 531 drivers/staging/media/imx/imx7-media-csi.c csi->sink = NULL; csi 535 drivers/staging/media/imx/imx7-media-csi.c if (csi->sink || csi->src_sd) csi 536 drivers/staging/media/imx/imx7-media-csi.c ret = imx7_csi_init(csi); csi 538 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_deinit(csi); csi 541 drivers/staging/media/imx/imx7-media-csi.c mutex_unlock(&csi->lock); csi 551 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 559 drivers/staging/media/imx/imx7-media-csi.c ret = imx7_csi_get_upstream_endpoint(csi, &upstream_ep, true); csi 561 drivers/staging/media/imx/imx7-media-csi.c v4l2_err(&csi->sd, "failed to find upstream endpoint\n"); csi 565 drivers/staging/media/imx/imx7-media-csi.c mutex_lock(&csi->lock); csi 567 drivers/staging/media/imx/imx7-media-csi.c csi->upstream_ep = upstream_ep; csi 568 drivers/staging/media/imx/imx7-media-csi.c csi->is_csi2 = (upstream_ep.bus_type == V4L2_MBUS_CSI2_DPHY); csi 570 drivers/staging/media/imx/imx7-media-csi.c mutex_unlock(&csi->lock); csi 575 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_update_buf(struct imx7_csi *csi, dma_addr_t phys, csi 579 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, phys, CSI_CSIDMASA_FB2); csi 581 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, phys, CSI_CSIDMASA_FB1); csi 584 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_setup_vb2_buf(struct imx7_csi *csi) csi 586 drivers/staging/media/imx/imx7-media-csi.c struct imx_media_video_dev *vdev = csi->vdev; csi 595 drivers/staging/media/imx/imx7-media-csi.c csi->active_vb2_buf[i] = buf; csi 599 drivers/staging/media/imx/imx7-media-csi.c csi->active_vb2_buf[i] = NULL; csi 600 drivers/staging/media/imx/imx7-media-csi.c phys[i] = csi->underrun_buf.phys; csi 603 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_update_buf(csi, phys[i], i); csi 607 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_dma_unsetup_vb2_buf(struct imx7_csi *csi, csi 615 drivers/staging/media/imx/imx7-media-csi.c buf = csi->active_vb2_buf[i]; csi 625 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_vb2_buf_done(struct imx7_csi *csi) csi 627 drivers/staging/media/imx/imx7-media-csi.c struct imx_media_video_dev *vdev = csi->vdev; csi 632 drivers/staging/media/imx/imx7-media-csi.c done = csi->active_vb2_buf[csi->buf_num]; csi 635 drivers/staging/media/imx/imx7-media-csi.c done->vbuf.sequence = csi->frame_sequence; csi 640 drivers/staging/media/imx/imx7-media-csi.c csi->frame_sequence++; csi 646 drivers/staging/media/imx/imx7-media-csi.c csi->active_vb2_buf[csi->buf_num] = next; csi 648 drivers/staging/media/imx/imx7-media-csi.c phys = csi->underrun_buf.phys; csi 649 drivers/staging/media/imx/imx7-media-csi.c csi->active_vb2_buf[csi->buf_num] = NULL; csi 652 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_update_buf(csi, phys, csi->buf_num); csi 657 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = data; csi 660 drivers/staging/media/imx/imx7-media-csi.c spin_lock(&csi->irqlock); csi 662 drivers/staging/media/imx/imx7-media-csi.c status = imx7_csi_irq_clear(csi); csi 665 drivers/staging/media/imx/imx7-media-csi.c dev_warn(csi->dev, "Rx fifo overflow\n"); csi 666 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_error_recovery(csi); csi 670 drivers/staging/media/imx/imx7-media-csi.c dev_warn(csi->dev, "Hresponse error detected\n"); csi 671 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_error_recovery(csi); csi 675 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_disable(csi); csi 677 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_reflash(csi); csi 679 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_enable(csi); csi 693 drivers/staging/media/imx/imx7-media-csi.c csi->buf_num = 0; csi 695 drivers/staging/media/imx/imx7-media-csi.c csi->buf_num = 1; csi 700 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_vb2_buf_done(csi); csi 702 drivers/staging/media/imx/imx7-media-csi.c if (csi->last_eof) { csi 703 drivers/staging/media/imx/imx7-media-csi.c complete(&csi->last_eof_completion); csi 704 drivers/staging/media/imx/imx7-media-csi.c csi->last_eof = false; csi 708 drivers/staging/media/imx/imx7-media-csi.c spin_unlock(&csi->irqlock); csi 713 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_dma_start(struct imx7_csi *csi) csi 715 drivers/staging/media/imx/imx7-media-csi.c struct imx_media_video_dev *vdev = csi->vdev; csi 719 drivers/staging/media/imx/imx7-media-csi.c ret = imx_media_alloc_dma_buf(csi->dev, &csi->underrun_buf, csi 722 drivers/staging/media/imx/imx7-media-csi.c v4l2_warn(&csi->sd, "consider increasing the CMA area\n"); csi 726 drivers/staging/media/imx/imx7-media-csi.c csi->frame_sequence = 0; csi 727 drivers/staging/media/imx/imx7-media-csi.c csi->last_eof = false; csi 728 drivers/staging/media/imx/imx7-media-csi.c init_completion(&csi->last_eof_completion); csi 730 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_setup_vb2_buf(csi); csi 735 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_dma_stop(struct imx7_csi *csi) csi 742 drivers/staging/media/imx/imx7-media-csi.c spin_lock_irqsave(&csi->irqlock, flags); csi 743 drivers/staging/media/imx/imx7-media-csi.c csi->last_eof = true; csi 744 drivers/staging/media/imx/imx7-media-csi.c spin_unlock_irqrestore(&csi->irqlock, flags); csi 750 drivers/staging/media/imx/imx7-media-csi.c ret = wait_for_completion_timeout(&csi->last_eof_completion, csi 753 drivers/staging/media/imx/imx7-media-csi.c v4l2_warn(&csi->sd, "wait last EOF timeout\n"); csi 755 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_disable_irq(csi); csi 757 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_unsetup_vb2_buf(csi, VB2_BUF_STATE_ERROR); csi 759 drivers/staging/media/imx/imx7-media-csi.c imx_media_free_dma_buf(csi->dev, &csi->underrun_buf); csi 762 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_configure(struct imx7_csi *csi) csi 764 drivers/staging/media/imx/imx7-media-csi.c struct imx_media_video_dev *vdev = csi->vdev; csi 766 drivers/staging/media/imx/imx7-media-csi.c __u32 in_code = csi->format_mbus[IMX7_CSI_PAD_SINK].code; csi 771 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_deinterlace_enable(csi, true); csi 772 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_buf_stride_set(csi, out_pix->width); csi 774 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_deinterlace_enable(csi, false); csi 775 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_buf_stride_set(csi, 0); csi 778 drivers/staging/media/imx/imx7-media-csi.c cr18 = imx7_csi_reg_read(csi, CSI_CSICR18); csi 780 drivers/staging/media/imx/imx7-media-csi.c if (!csi->is_csi2) { csi 785 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_set_imagpara(csi, width, out_pix->height); csi 789 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr18, CSI_CSICR18); csi 794 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_set_imagpara(csi, width, out_pix->height); csi 796 drivers/staging/media/imx/imx7-media-csi.c cr1 = imx7_csi_reg_read(csi, CSI_CSICR1); csi 823 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr1, CSI_CSICR1); csi 824 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_reg_write(csi, cr18, CSI_CSICR18); csi 829 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_enable(struct imx7_csi *csi) csi 831 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_sw_reset(csi); csi 833 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dmareq_rff_enable(csi); csi 834 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_enable_irq(csi); csi 835 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_enable(csi); csi 838 drivers/staging/media/imx/imx7-media-csi.c static void imx7_csi_disable(struct imx7_csi *csi) csi 840 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dmareq_rff_disable(csi); csi 842 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_disable_irq(csi); csi 844 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_buf_stride_set(csi, 0); csi 846 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_hw_disable(csi); csi 849 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_streaming_start(struct imx7_csi *csi) csi 853 drivers/staging/media/imx/imx7-media-csi.c ret = imx7_csi_dma_start(csi); csi 857 drivers/staging/media/imx/imx7-media-csi.c ret = imx7_csi_configure(csi); csi 861 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_enable(csi); csi 866 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_stop(csi); csi 871 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_streaming_stop(struct imx7_csi *csi) csi 873 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_dma_stop(csi); csi 875 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_disable(csi); csi 882 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 885 drivers/staging/media/imx/imx7-media-csi.c mutex_lock(&csi->lock); csi 887 drivers/staging/media/imx/imx7-media-csi.c if (!csi->src_sd || !csi->sink) { csi 892 drivers/staging/media/imx/imx7-media-csi.c if (csi->is_streaming == !!enable) csi 896 drivers/staging/media/imx/imx7-media-csi.c ret = v4l2_subdev_call(csi->src_sd, video, s_stream, 1); csi 900 drivers/staging/media/imx/imx7-media-csi.c ret = imx7_csi_streaming_start(csi); csi 902 drivers/staging/media/imx/imx7-media-csi.c v4l2_subdev_call(csi->src_sd, video, s_stream, 0); csi 906 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_streaming_stop(csi); csi 908 drivers/staging/media/imx/imx7-media-csi.c v4l2_subdev_call(csi->src_sd, video, s_stream, 0); csi 911 drivers/staging/media/imx/imx7-media-csi.c csi->is_streaming = !!enable; csi 914 drivers/staging/media/imx/imx7-media-csi.c mutex_unlock(&csi->lock); csi 920 drivers/staging/media/imx/imx7-media-csi.c imx7_csi_get_format(struct imx7_csi *csi, csi 926 drivers/staging/media/imx/imx7-media-csi.c return v4l2_subdev_get_try_format(&csi->sd, cfg, pad); csi 928 drivers/staging/media/imx/imx7-media-csi.c return &csi->format_mbus[pad]; csi 935 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 939 drivers/staging/media/imx/imx7-media-csi.c mutex_lock(&csi->lock); csi 941 drivers/staging/media/imx/imx7-media-csi.c in_fmt = imx7_csi_get_format(csi, cfg, IMX7_CSI_PAD_SINK, code->which); csi 961 drivers/staging/media/imx/imx7-media-csi.c mutex_unlock(&csi->lock); csi 970 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 974 drivers/staging/media/imx/imx7-media-csi.c mutex_lock(&csi->lock); csi 976 drivers/staging/media/imx/imx7-media-csi.c fmt = imx7_csi_get_format(csi, cfg, sdformat->pad, sdformat->which); csi 985 drivers/staging/media/imx/imx7-media-csi.c mutex_unlock(&csi->lock); csi 990 drivers/staging/media/imx/imx7-media-csi.c static int imx7_csi_try_fmt(struct imx7_csi *csi, csi 999 drivers/staging/media/imx/imx7-media-csi.c in_fmt = imx7_csi_get_format(csi, cfg, IMX7_CSI_PAD_SINK, csi 1044 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 1055 drivers/staging/media/imx/imx7-media-csi.c mutex_lock(&csi->lock); csi 1057 drivers/staging/media/imx/imx7-media-csi.c if (csi->is_streaming) { csi 1062 drivers/staging/media/imx/imx7-media-csi.c ret = imx7_csi_try_fmt(csi, cfg, sdformat, &cc); csi 1066 drivers/staging/media/imx/imx7-media-csi.c fmt = imx7_csi_get_format(csi, cfg, sdformat->pad, sdformat->which); csi 1079 drivers/staging/media/imx/imx7-media-csi.c if (imx7_csi_try_fmt(csi, cfg, &format, &outcc)) { csi 1083 drivers/staging/media/imx/imx7-media-csi.c outfmt = imx7_csi_get_format(csi, cfg, IMX7_CSI_PAD_SRC, csi 1088 drivers/staging/media/imx/imx7-media-csi.c csi->cc[IMX7_CSI_PAD_SRC] = outcc; csi 1092 drivers/staging/media/imx/imx7-media-csi.c csi->cc[sdformat->pad] = cc; csi 1095 drivers/staging/media/imx/imx7-media-csi.c mutex_unlock(&csi->lock); csi 1102 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 1107 drivers/staging/media/imx/imx7-media-csi.c csi->pad[i].flags = (i == IMX7_CSI_PAD_SINK) ? csi 1111 drivers/staging/media/imx/imx7-media-csi.c ret = imx_media_init_mbus_fmt(&csi->format_mbus[i], csi 1113 drivers/staging/media/imx/imx7-media-csi.c &csi->cc[i]); csi 1118 drivers/staging/media/imx/imx7-media-csi.c csi->frame_interval[i].numerator = 1; csi 1119 drivers/staging/media/imx/imx7-media-csi.c csi->frame_interval[i].denominator = 30; csi 1122 drivers/staging/media/imx/imx7-media-csi.c ret = media_entity_pads_init(&sd->entity, IMX7_CSI_PADS_NUM, csi->pad); csi 1126 drivers/staging/media/imx/imx7-media-csi.c return imx_media_capture_device_register(csi->vdev); csi 1131 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 1133 drivers/staging/media/imx/imx7-media-csi.c imx_media_capture_device_unregister(csi->vdev); csi 1139 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 1148 drivers/staging/media/imx/imx7-media-csi.c &csi->cc[i]); csi 1195 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi; csi 1198 drivers/staging/media/imx/imx7-media-csi.c csi = devm_kzalloc(&pdev->dev, sizeof(*csi), GFP_KERNEL); csi 1199 drivers/staging/media/imx/imx7-media-csi.c if (!csi) csi 1202 drivers/staging/media/imx/imx7-media-csi.c csi->dev = dev; csi 1204 drivers/staging/media/imx/imx7-media-csi.c csi->mclk = devm_clk_get(&pdev->dev, "mclk"); csi 1205 drivers/staging/media/imx/imx7-media-csi.c if (IS_ERR(csi->mclk)) { csi 1206 drivers/staging/media/imx/imx7-media-csi.c ret = PTR_ERR(csi->mclk); csi 1211 drivers/staging/media/imx/imx7-media-csi.c csi->irq = platform_get_irq(pdev, 0); csi 1212 drivers/staging/media/imx/imx7-media-csi.c if (csi->irq < 0) csi 1213 drivers/staging/media/imx/imx7-media-csi.c return csi->irq; csi 1215 drivers/staging/media/imx/imx7-media-csi.c csi->regbase = devm_platform_ioremap_resource(pdev, 0); csi 1216 drivers/staging/media/imx/imx7-media-csi.c if (IS_ERR(csi->regbase)) csi 1217 drivers/staging/media/imx/imx7-media-csi.c return PTR_ERR(csi->regbase); csi 1219 drivers/staging/media/imx/imx7-media-csi.c spin_lock_init(&csi->irqlock); csi 1220 drivers/staging/media/imx/imx7-media-csi.c mutex_init(&csi->lock); csi 1223 drivers/staging/media/imx/imx7-media-csi.c ret = devm_request_irq(dev, csi->irq, imx7_csi_irq_handler, 0, "csi", csi 1224 drivers/staging/media/imx/imx7-media-csi.c (void *)csi); csi 1236 drivers/staging/media/imx/imx7-media-csi.c platform_set_drvdata(pdev, &csi->sd); csi 1246 drivers/staging/media/imx/imx7-media-csi.c csi->imxmd = imxmd; csi 1247 drivers/staging/media/imx/imx7-media-csi.c v4l2_subdev_init(&csi->sd, &imx7_csi_subdev_ops); csi 1248 drivers/staging/media/imx/imx7-media-csi.c v4l2_set_subdevdata(&csi->sd, csi); csi 1249 drivers/staging/media/imx/imx7-media-csi.c csi->sd.internal_ops = &imx7_csi_internal_ops; csi 1250 drivers/staging/media/imx/imx7-media-csi.c csi->sd.entity.ops = &imx7_csi_entity_ops; csi 1251 drivers/staging/media/imx/imx7-media-csi.c csi->sd.entity.function = MEDIA_ENT_F_VID_IF_BRIDGE; csi 1252 drivers/staging/media/imx/imx7-media-csi.c csi->sd.dev = &pdev->dev; csi 1253 drivers/staging/media/imx/imx7-media-csi.c csi->sd.owner = THIS_MODULE; csi 1254 drivers/staging/media/imx/imx7-media-csi.c csi->sd.flags = V4L2_SUBDEV_FL_HAS_DEVNODE; csi 1255 drivers/staging/media/imx/imx7-media-csi.c csi->sd.grp_id = IMX_MEDIA_GRP_ID_CSI; csi 1256 drivers/staging/media/imx/imx7-media-csi.c snprintf(csi->sd.name, sizeof(csi->sd.name), "csi"); csi 1258 drivers/staging/media/imx/imx7-media-csi.c csi->vdev = imx_media_capture_device_init(csi->sd.dev, &csi->sd, csi 1260 drivers/staging/media/imx/imx7-media-csi.c if (IS_ERR(csi->vdev)) csi 1261 drivers/staging/media/imx/imx7-media-csi.c return PTR_ERR(csi->vdev); csi 1263 drivers/staging/media/imx/imx7-media-csi.c v4l2_ctrl_handler_init(&csi->ctrl_hdlr, 0); csi 1264 drivers/staging/media/imx/imx7-media-csi.c csi->sd.ctrl_handler = &csi->ctrl_hdlr; csi 1266 drivers/staging/media/imx/imx7-media-csi.c ret = v4l2_async_register_fwnode_subdev(&csi->sd, csi 1276 drivers/staging/media/imx/imx7-media-csi.c imx_media_capture_device_unregister(csi->vdev); csi 1277 drivers/staging/media/imx/imx7-media-csi.c imx_media_capture_device_remove(csi->vdev); csi 1278 drivers/staging/media/imx/imx7-media-csi.c v4l2_ctrl_handler_free(&csi->ctrl_hdlr); csi 1287 drivers/staging/media/imx/imx7-media-csi.c mutex_destroy(&csi->lock); csi 1295 drivers/staging/media/imx/imx7-media-csi.c struct imx7_csi *csi = v4l2_get_subdevdata(sd); csi 1296 drivers/staging/media/imx/imx7-media-csi.c struct imx_media_dev *imxmd = csi->imxmd; csi 1305 drivers/staging/media/imx/imx7-media-csi.c imx_media_capture_device_unregister(csi->vdev); csi 1306 drivers/staging/media/imx/imx7-media-csi.c imx_media_capture_device_remove(csi->vdev); csi 1309 drivers/staging/media/imx/imx7-media-csi.c v4l2_ctrl_handler_free(&csi->ctrl_hdlr); csi 1311 drivers/staging/media/imx/imx7-media-csi.c mutex_destroy(&csi->lock); csi 20 drivers/staging/uwb/allocator.c for (col = ci->csi.start_col; col < UWB_NUM_ZONES; col += ci->csi.interval) { csi 22 drivers/staging/uwb/allocator.c safe_mas = ci->csi.safe_mas_per_col; csi 23 drivers/staging/uwb/allocator.c unsafe_mas = ci->csi.unsafe_mas_per_col; csi 130 drivers/staging/uwb/allocator.c struct uwb_rsv_col_set_info *csi = &ci->csi; csi 169 drivers/staging/uwb/allocator.c csi->start_col = tmp_csi.start_col; csi 175 drivers/staging/uwb/allocator.c csi->start_col = tmp_csi.start_col; csi 181 drivers/staging/uwb/allocator.c csi->interval = interval; csi 182 drivers/staging/uwb/allocator.c csi->safe_mas_per_col = num_safe_mas; csi 183 drivers/staging/uwb/allocator.c csi->unsafe_mas_per_col = num_unsafe_mas; csi 135 drivers/staging/uwb/uwb-internal.h struct uwb_rsv_col_set_info csi; csi 358 include/video/imx-ipu-v3.h int ipu_csi_init_interface(struct ipu_csi *csi, csi 362 include/video/imx-ipu-v3.h bool ipu_csi_is_interlaced(struct ipu_csi *csi); csi 363 include/video/imx-ipu-v3.h void ipu_csi_get_window(struct ipu_csi *csi, struct v4l2_rect *w); csi 364 include/video/imx-ipu-v3.h void ipu_csi_set_window(struct ipu_csi *csi, struct v4l2_rect *w); csi 365 include/video/imx-ipu-v3.h void ipu_csi_set_downsize(struct ipu_csi *csi, bool horiz, bool vert); csi 366 include/video/imx-ipu-v3.h void ipu_csi_set_test_generator(struct ipu_csi *csi, bool active, csi 369 include/video/imx-ipu-v3.h int ipu_csi_set_mipi_datatype(struct ipu_csi *csi, u32 vc, csi 371 include/video/imx-ipu-v3.h int ipu_csi_set_skip_smfc(struct ipu_csi *csi, u32 skip, csi 373 include/video/imx-ipu-v3.h int ipu_csi_set_dest(struct ipu_csi *csi, enum ipu_csi_dest csi_dest); csi 374 include/video/imx-ipu-v3.h int ipu_csi_enable(struct ipu_csi *csi); csi 375 include/video/imx-ipu-v3.h int ipu_csi_disable(struct ipu_csi *csi); csi 377 include/video/imx-ipu-v3.h void ipu_csi_put(struct ipu_csi *csi); csi 378 include/video/imx-ipu-v3.h void ipu_csi_dump(struct ipu_csi *csi); csi 496 include/video/imx-ipu-v3.h int csi;