On Tue, 20 Sep 2022 12:18, AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx> wrote: >Il 19/09/22 18:56, Guillaume Ranquet ha scritto: >> To prepare support for newer chips that need to share their address >> range with a dedicated ddc driver, move to a syscon. >> >> Signed-off-by: Guillaume Ranquet <granquet@xxxxxxxxxxxx> >> >> diff --git a/drivers/gpu/drm/mediatek/mtk_hdmi.c b/drivers/gpu/drm/mediatek/mtk_hdmi.c >> index 3196189429bc..5cd05d4fe1a9 100644 >> --- a/drivers/gpu/drm/mediatek/mtk_hdmi.c >> +++ b/drivers/gpu/drm/mediatek/mtk_hdmi.c > >..snip.. > >> @@ -1428,7 +1413,6 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, >> struct device_node *cec_np, *remote, *i2c_np; >> struct platform_device *cec_pdev; >> struct regmap *regmap; >> - struct resource *mem; >> int ret; >> >> ret = mtk_hdmi_get_all_clk(hdmi, np); >> @@ -1474,8 +1458,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi, >> } >> hdmi->sys_regmap = regmap; >> >> - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); >> - hdmi->regs = devm_ioremap_resource(dev, mem); >> + hdmi->regs = syscon_node_to_regmap(dev->of_node); > >Nack. You're breaking ABI, this will force everyone to add syscon to devicetree, >hence this breaks retrocompatibility with old devicetrees. > >Hint: not here, device_node_to_regmap() Hi Angelo, I'm sorry, I didn't think device tree retro compatibility was a thing. I'll drop the requirement for the module to be a syscon. Thx for the hint. Thx, Guillaume. > >Regards, >Angelo > >> if (IS_ERR(hdmi->regs)) { >> ret = PTR_ERR(hdmi->regs); >> goto put_device; > >