F_MAX_FIELDS,
};
-struct cal_csi2_phy {
+struct cal_camerarx_data {
struct {
unsigned int lsb;
unsigned int msb;
};
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 },
};
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 },
};
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 },
};
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),
};
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)
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,
};
/*