Lines Matching full:cal

3  * TI Camera Access Layer (CAL) - CAMERARX
25 #include "cal.h"
82 u32 val = cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance)); in cal_camerarx_lane_config()
103 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), val); in cal_camerarx_lane_config()
110 u32 num_lanes = phy->cal->data->camerarx[phy->instance].num_lanes; in cal_camerarx_enable()
176 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), in cal_camerarx_power()
182 current_state = cal_read_field(phy->cal, in cal_camerarx_power()
203 if (cal_read_field(phy->cal, in cal_camerarx_wait_reset()
211 if (cal_read_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), in cal_camerarx_wait_reset()
223 if (cal_read_field(phy->cal, in cal_camerarx_wait_stop_state()
230 if (cal_read_field(phy->cal, CAL_CSI2_TIMING(phy->instance), in cal_camerarx_wait_stop_state()
253 cal_write(phy->cal, CAL_HL_IRQENABLE_SET(0), in cal_camerarx_enable_irqs()
256 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_IRQENABLE(phy->instance), in cal_camerarx_enable_irqs()
258 cal_write(phy->cal, CAL_CSI2_VC_IRQENABLE(phy->instance), in cal_camerarx_enable_irqs()
265 cal_write(phy->cal, CAL_HL_IRQENABLE_CLR(0), in cal_camerarx_disable_irqs()
268 cal_write(phy->cal, CAL_CSI2_COMPLEXIO_IRQENABLE(phy->instance), 0); in cal_camerarx_disable_irqs()
269 cal_write(phy->cal, CAL_CSI2_VC_IRQENABLE(phy->instance), 0); in cal_camerarx_disable_irqs()
274 cal_write_field(phy->cal, CAL_CSI2_PPI_CTRL(phy->instance), in cal_camerarx_ppi_enable()
277 cal_write_field(phy->cal, CAL_CSI2_PPI_CTRL(phy->instance), in cal_camerarx_ppi_enable()
283 cal_write_field(phy->cal, CAL_CSI2_PPI_CTRL(phy->instance), in cal_camerarx_ppi_disable()
338 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), in cal_camerarx_start()
343 cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance))); in cal_camerarx_start()
361 sscounter = DIV_ROUND_UP(clk_get_rate(phy->cal->fclk), 10000 * 16 * 4); in cal_camerarx_start()
363 val = cal_read(phy->cal, CAL_CSI2_TIMING(phy->instance)); in cal_camerarx_start()
368 cal_write(phy->cal, CAL_CSI2_TIMING(phy->instance), val); in cal_camerarx_start()
371 cal_read(phy->cal, CAL_CSI2_TIMING(phy->instance))); in cal_camerarx_start()
374 cal_write_field(phy->cal, CAL_CSI2_TIMING(phy->instance), in cal_camerarx_start()
378 cal_read(phy->cal, CAL_CSI2_TIMING(phy->instance))); in cal_camerarx_start()
442 cal_write_field(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance), in cal_camerarx_stop()
448 cal_read(phy->cal, CAL_CSI2_COMPLEXIO_CFG(phy->instance))); in cal_camerarx_stop()
490 static int cal_camerarx_regmap_init(struct cal_dev *cal, in cal_camerarx_regmap_init() argument
496 if (!cal->data) in cal_camerarx_regmap_init()
499 phy_data = &cal->data->camerarx[phy->instance]; in cal_camerarx_regmap_init()
503 .reg = cal->syscon_camerrx_offset, in cal_camerarx_regmap_init()
512 phy->fields[i] = devm_regmap_field_alloc(cal->dev, in cal_camerarx_regmap_init()
513 cal->syscon_camerrx, in cal_camerarx_regmap_init()
516 cal_err(cal, "Unable to allocate regmap fields\n"); in cal_camerarx_regmap_init()
536 ep_node = of_graph_get_endpoint_by_regs(phy->cal->dev->of_node, in cal_camerarx_parse_dt()
766 cal_err(phy->cal, in cal_camerarx_get_frame_desc()
772 cal_err(phy->cal, in cal_camerarx_get_frame_desc()
809 struct cal_camerarx *cal_camerarx_create(struct cal_dev *cal, in cal_camerarx_create() argument
812 struct platform_device *pdev = to_platform_device(cal->dev); in cal_camerarx_create()
818 phy = devm_kzalloc(cal->dev, sizeof(*phy), GFP_KERNEL); in cal_camerarx_create()
822 phy->cal = cal; in cal_camerarx_create()
831 phy->base = devm_ioremap_resource(cal->dev, phy->res); in cal_camerarx_create()
833 cal_err(cal, "failed to ioremap\n"); in cal_camerarx_create()
837 cal_dbg(1, cal, "ioresource %s at %pa - %pa\n", in cal_camerarx_create()
840 ret = cal_camerarx_regmap_init(cal, phy); in cal_camerarx_create()
854 sd->dev = cal->dev; in cal_camerarx_create()
869 ret = v4l2_device_register_subdev(&cal->v4l2_dev, sd); in cal_camerarx_create()