From d1739eabdd9600569ff2da170b3baf343263f952 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 6 Jul 2020 20:35:46 +0200 Subject: media: ti-vpe: cal: Rename cal_csi2_phy to cal_camerarx_data The cal_csi2_phy contains platform data for the CAMERARX blocks. Rename it to cal_camerarx_data. Signed-off-by: Laurent Pinchart Reviewed-by: Tomi Valkeinen Reviewed-by: Benoit Parrot Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/ti-vpe/cal.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) (limited to 'drivers/media') diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index 621cc3f26762..faf18980656e 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -215,7 +215,7 @@ enum cal_camerarx_field { F_MAX_FIELDS, }; -struct cal_csi2_phy { +struct cal_camerarx_data { struct { unsigned int lsb; unsigned int msb; @@ -224,13 +224,12 @@ struct cal_csi2_phy { }; struct cal_data { + const struct cal_camerarx_data *camerarx; unsigned int num_csi2_phy; - const struct cal_csi2_phy *csi2_phy_core; - unsigned int flags; }; -static const struct cal_csi2_phy dra72x_cal_csi_phy[] = { +static const struct cal_camerarx_data dra72x_cal_camerarx[] = { { .fields = { [F_CTRLCLKEN] = { 10, 10 }, @@ -252,17 +251,17 @@ static const struct cal_csi2_phy dra72x_cal_csi_phy[] = { }; static const struct cal_data dra72x_cal_data = { - .csi2_phy_core = dra72x_cal_csi_phy, - .num_csi2_phy = ARRAY_SIZE(dra72x_cal_csi_phy), + .camerarx = dra72x_cal_camerarx, + .num_csi2_phy = ARRAY_SIZE(dra72x_cal_camerarx), }; static const struct cal_data dra72x_es1_cal_data = { - .csi2_phy_core = dra72x_cal_csi_phy, - .num_csi2_phy = ARRAY_SIZE(dra72x_cal_csi_phy), + .camerarx = dra72x_cal_camerarx, + .num_csi2_phy = ARRAY_SIZE(dra72x_cal_camerarx), .flags = DRA72_CAL_PRE_ES2_LDO_DISABLE, }; -static const struct cal_csi2_phy dra76x_cal_csi_phy[] = { +static const struct cal_camerarx_data dra76x_cal_csi_phy[] = { { .fields = { [F_CTRLCLKEN] = { 8, 8 }, @@ -284,11 +283,11 @@ static const struct cal_csi2_phy dra76x_cal_csi_phy[] = { }; static const struct cal_data dra76x_cal_data = { - .csi2_phy_core = dra76x_cal_csi_phy, + .camerarx = dra76x_cal_csi_phy, .num_csi2_phy = ARRAY_SIZE(dra76x_cal_csi_phy), }; -static const struct cal_csi2_phy am654_cal_csi_phy[] = { +static const struct cal_camerarx_data am654_cal_csi_phy[] = { { .fields = { [F_CTRLCLKEN] = { 15, 15 }, @@ -300,7 +299,7 @@ static const struct cal_csi2_phy am654_cal_csi_phy[] = { }; static const struct cal_data am654_cal_data = { - .csi2_phy_core = am654_cal_csi_phy, + .camerarx = am654_cal_csi_phy, .num_csi2_phy = ARRAY_SIZE(am654_cal_csi_phy), }; @@ -456,7 +455,7 @@ static u32 cal_data_get_phy_max_lanes(struct cal_ctx *ctx) struct cal_dev *dev = ctx->dev; u32 phy_id = ctx->csi2_port; - return dev->data->csi2_phy_core[phy_id].num_lanes; + return dev->data->camerarx[phy_id].num_lanes; } static u32 cal_data_get_num_csi2_phy(struct cal_dev *dev) @@ -468,19 +467,19 @@ static int cal_camerarx_regmap_init(struct cal_dev *dev, struct cal_camerarx *cc, unsigned int idx) { - const struct cal_csi2_phy *phy; + const struct cal_camerarx_data *phy_data; unsigned int i; if (!dev->data) return -EINVAL; - phy = &dev->data->csi2_phy_core[idx]; + phy_data = &dev->data->camerarx[idx]; for (i = 0; i < F_MAX_FIELDS; i++) { struct reg_field field = { .reg = dev->syscon_camerrx_offset, - .lsb = phy->fields[i].lsb, - .msb = phy->fields[i].msb, + .lsb = phy_data->fields[i].lsb, + .msb = phy_data->fields[i].msb, }; /* -- cgit v1.2.3