struct mtk_dp_data {
int bridge_type;
unsigned int smc_cmd;
+ const struct mtk_dp_efuse_fmt *efuse_fmt;
};
-static const struct mtk_dp_efuse_fmt mtk_dp_efuse_data[MTK_DP_CAL_MAX] = {
+
+static const struct mtk_dp_efuse_fmt mt8195_edp_efuse_fmt[MTK_DP_CAL_MAX] = {
[MTK_DP_CAL_GLB_BIAS_TRIM] = {
.idx = 3,
.shift = 27,
}
for (i = 0; i < MTK_DP_CAL_MAX; i++) {
- fmt = &mtk_dp_efuse_data[i];
+ fmt = &mtk_dp->data->efuse_fmt[i];
cal_data[i] = (buf[fmt->idx] >> fmt->shift) & fmt->mask;
if (cal_data[i] < fmt->min_val || cal_data[i] > fmt->max_val) {
use_default_val:
dev_warn(mtk_dp->dev, "Use default calibration data\n");
for (i = 0; i < MTK_DP_CAL_MAX; i++)
- cal_data[i] = mtk_dp_efuse_data[i].default_val;
+ cal_data[i] = mtk_dp->data->efuse_fmt[i].default_val;
}
static void mtk_dp_set_calibration_data(struct mtk_dp *mtk_dp)
static const struct mtk_dp_data mt8195_edp_data = {
.bridge_type = DRM_MODE_CONNECTOR_eDP,
.smc_cmd = MTK_DP_SIP_ATF_EDP_VIDEO_UNMUTE,
+ .efuse_fmt = mt8195_edp_efuse_fmt,
};
static const struct of_device_id mtk_dp_of_match[] = {