Lines Matching full:cal

3  * TI Camera Access Layer (CAL) - CAMERARX
25 #include "cal.h"
100 u32 val = cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance));
121 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), val);
128 u32 num_lanes = phy->cal->data->camerarx[phy->instance].num_lanes;
194 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance),
200 current_state = cal_read_field(phy->cal,
221 if (cal_read_field(phy->cal,
229 if (cal_read_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance),
241 if (cal_read_field(phy->cal,
248 if (cal_read_field(phy->cal, CAL_CSI2_TIMING(phy->instance),
271 cal_write(phy->cal, CAL_HL_IRQENABLE_SET(0),
274 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_IRQENABLE(phy->instance),
276 cal_write(phy->cal, CAL_CSI2_VC_IRQENABLE(phy->instance),
283 cal_write(phy->cal, CAL_HL_IRQENABLE_CLR(0),
286 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_IRQENABLE(phy->instance), 0);
287 cal_write(phy->cal, CAL_CSI2_VC_IRQENABLE(phy->instance), 0);
292 cal_write_field(phy->cal, CAL_CSI2_PPI_CTRL(phy->instance),
295 cal_write_field(phy->cal, CAL_CSI2_PPI_CTRL(phy->instance),
301 cal_write_field(phy->cal, CAL_CSI2_PPI_CTRL(phy->instance),
373 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance),
378 cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance)));
396 sscounter = DIV_ROUND_UP(clk_get_rate(phy->cal->fclk), 10000 * 16 * 4);
398 val = cal_read(phy->cal, CAL_CSI2_TIMING(phy->instance));
403 cal_write(phy->cal, CAL_CSI2_TIMING(phy->instance), val);
406 cal_read(phy->cal, CAL_CSI2_TIMING(phy->instance)));
409 cal_write_field(phy->cal, CAL_CSI2_TIMING(phy->instance),
413 cal_read(phy->cal, CAL_CSI2_TIMING(phy->instance)));
488 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance),
494 cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance)));
538 static int cal_camerarx_regmap_init(struct cal_dev *cal,
544 if (!cal->data)
547 phy_data = &cal->data->camerarx[phy->instance];
551 .reg = cal->syscon_camerrx_offset,
560 phy->fields[i] = devm_regmap_field_alloc(cal->dev,
561 cal->syscon_camerrx,
564 cal_err(cal, "Unable to allocate regmap fields\n");
584 ep_node = of_graph_get_endpoint_by_regs(phy->cal->dev->of_node,
902 cal_err(phy->cal,
914 cal_err(phy->cal, "Stream %u not found in remote frame desc\n",
959 struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal,
962 struct platform_device *pdev = to_platform_device(cal->dev);
968 phy = devm_kzalloc(cal->dev, sizeof(*phy), GFP_KERNEL);
972 phy->cal = cal;
981 phy->base = devm_ioremap_resource(cal->dev, phy->res);
983 cal_err(cal, "failed to ioremap\n");
987 cal_dbg(1, cal, "ioresource %s at %pa - %pa\n",
990 ret = cal_camerarx_regmap_init(cal, phy);
1005 sd->dev = cal->dev;
1020 ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd);