Lines Matching full:csi2

38 #include "ipu6-isys-csi2.h"
41 #include "ipu6-platform-isys-csi2-reg.h"
107 struct ipu6_isys_csi2_config *csi2) in isys_complete_ext_device_registration() argument
125 &isys->csi2[csi2->port].asd.sd.entity, in isys_complete_ext_device_registration()
133 isys->csi2[csi2->port].nlanes = csi2->nlanes; in isys_complete_ext_device_registration()
162 const struct ipu6_isys_internal_csi2_pdata *csi2 = in isys_csi2_unregister_subdevices() local
163 &isys->pdata->ipdata->csi2; in isys_csi2_unregister_subdevices()
166 for (i = 0; i < csi2->nports; i++) in isys_csi2_unregister_subdevices()
167 ipu6_isys_csi2_cleanup(&isys->csi2[i]); in isys_csi2_unregister_subdevices()
173 &isys->pdata->ipdata->csi2; in isys_csi2_register_subdevices()
178 ret = ipu6_isys_csi2_init(&isys->csi2[i], isys, in isys_csi2_register_subdevices()
191 ipu6_isys_csi2_cleanup(&isys->csi2[i]); in isys_csi2_register_subdevices()
199 &isys->pdata->ipdata->csi2; in isys_csi2_create_media_links()
205 struct media_entity *sd = &isys->csi2[i].asd.sd.entity; in isys_csi2_create_media_links()
208 struct ipu6_isys_video *av = &isys->csi2[i].av[j]; in isys_csi2_create_media_links()
213 dev_err(dev, "CSI2 can't create link\n"); in isys_csi2_create_media_links()
217 av->csi2 = &isys->csi2[i]; in isys_csi2_create_media_links()
227 &isys->pdata->ipdata->csi2; in isys_unregister_video_devices()
232 ipu6_isys_video_cleanup(&isys->csi2[i].av[j]); in isys_unregister_video_devices()
238 &isys->pdata->ipdata->csi2; in isys_register_video_devices()
244 struct ipu6_isys_video *av = &isys->csi2[i].av[j]; in isys_register_video_devices()
264 ipu6_isys_video_cleanup(&isys->csi2[i].av[j]); in isys_register_video_devices()
278 nports = isys->pdata->ipdata->csi2.nports; in isys_setup_hw()
284 writel(irqs, base + isys->pdata->ipdata->csi2.ctrl0_irq_edge); in isys_setup_hw()
285 writel(irqs, base + isys->pdata->ipdata->csi2.ctrl0_irq_lnp); in isys_setup_hw()
286 writel(irqs, base + isys->pdata->ipdata->csi2.ctrl0_irq_mask); in isys_setup_hw()
287 writel(irqs, base + isys->pdata->ipdata->csi2.ctrl0_irq_enable); in isys_setup_hw()
289 base + isys->pdata->ipdata->csi2.ctrl0_irq_clear); in isys_setup_hw()
306 static void ipu6_isys_csi2_isr(struct ipu6_isys_csi2 *csi2) in ipu6_isys_csi2_isr() argument
313 ipu6_isys_register_errors(csi2); in ipu6_isys_csi2_isr()
315 status = readl(csi2->base + CSI_PORT_REG_BASE_IRQ_CSI_SYNC + in ipu6_isys_csi2_isr()
318 writel(status, csi2->base + CSI_PORT_REG_BASE_IRQ_CSI_SYNC + in ipu6_isys_csi2_isr()
321 source = csi2->asd.source; in ipu6_isys_csi2_isr()
324 stream = ipu6_isys_query_stream_by_source(csi2->isys, in ipu6_isys_csi2_isr()
333 stream = ipu6_isys_query_stream_by_source(csi2->isys, in ipu6_isys_csi2_isr()
356 ctrl0_status = isys->pdata->ipdata->csi2.ctrl0_irq_status; in isys_isr()
357 ctrl0_clear = isys->pdata->ipdata->csi2.ctrl0_irq_clear; in isys_isr()
375 for (i = 0; i < isys->pdata->ipdata->csi2.nports; i++) { in isys_isr()
377 if (!isys->csi2[i].base) in isys_isr()
380 ipu6_isys_csi2_isr(&isys->csi2[i]); in isys_isr()
681 if (s_asd->csi2.port >= isys->pdata->ipdata->csi2.nports) { in isys_notifier_bound()
682 dev_err(&isys->adev->auxdev.dev, "invalid csi2 port %u\n", in isys_notifier_bound()
683 s_asd->csi2.port); in isys_notifier_bound()
694 sd->name, s_asd->csi2.nlanes, s_asd->csi2.port); in isys_notifier_bound()
695 ret = isys_complete_ext_device_registration(isys, sd, &s_asd->csi2); in isys_notifier_bound()
751 s_asd->csi2.port = vep.base.port; in isys_notifier_init()
752 s_asd->csi2.nlanes = vep.bus.mipi_csi2.num_data_lanes; in isys_notifier_init()
755 s_asd->csi2.port, s_asd->csi2.nlanes); in isys_notifier_init()
1067 csi2_pdata = &isys->pdata->ipdata->csi2; in isys_probe()
1069 isys->csi2 = devm_kcalloc(&auxdev->dev, csi2_pdata->nports, in isys_probe()
1070 sizeof(*isys->csi2), GFP_KERNEL); in isys_probe()
1071 if (!isys->csi2) in isys_probe()
1226 struct ipu6_isys_csi2 *csi2 = NULL; in isys_isr_one() local
1269 csi2 = ipu6_isys_subdev_to_csi2(stream->asd); in isys_isr_one()
1304 if (csi2) in isys_isr_one()
1305 ipu6_isys_csi2_error(csi2); in isys_isr_one()