[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABnWg9vsd7Lk4kR4j-XrgJXAX+sEd3J+oz3hFc4sEuCGRRy8qw@mail.gmail.com>
Date: Tue, 27 Sep 2022 06:06:06 -0700
From: Guillaume Ranquet <granquet@...libre.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Matthias Brugger <matthias.bgg@...il.com>,
Vinod Koul <vkoul@...nel.org>, Stephen Boyd <sboyd@...nel.org>,
David Airlie <airlied@...ux.ie>,
Rob Herring <robh+dt@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Daniel Vetter <daniel@...ll.ch>,
Chunfeng Yun <chunfeng.yun@...iatek.com>,
CK Hu <ck.hu@...iatek.com>, Jitao shi <jitao.shi@...iatek.com>,
Chun-Kuang Hu <chunkuang.hu@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Kishon Vijay Abraham I <kishon@...com>
Cc: linux-mediatek@...ts.infradead.org,
dri-devel@...ts.freedesktop.org,
Pablo Sun <pablo.sun@...iatek.com>, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org,
Mattijs Korpershoek <mkorpershoek@...libre.com>,
linux-arm-kernel@...ts.infradead.org,
linux-phy@...ts.infradead.org, devicetree@...r.kernel.org
Subject: Re: [PATCH v1 05/17] drm/mediatek: hdmi: use a syscon/regmap instead
of iomem
On Tue, 20 Sep 2022 12:18, AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com> 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@...libre.com>
>>
>> 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;
>
>
Powered by blists - more mailing lists