From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 269DDC07E9D for ; Tue, 27 Sep 2022 13:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date: MIME-Version:In-Reply-To:References:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=61iDNxTLYRNQSSAvnjwvdagYdL4y4cSXuiChbjAYVmU=; b=ilwUAyT0ov/nKQJP39a5jcIJ9q QHo4AKWx6KmzhpTv9G/vhlRgoqXgV1wEM4n/aU0tqk0S5rd+eMRr1YdcmPdkLUejoyqASn7j0xcrM iDN85GNUBFyhyG5tF5CpuPgH6Sje2Mpnzoxv6xqgoVolbCHBlIPYXLnueCCR5nzG4uUD23WQPNQa9 BeYXTn25kdVr6bbRWCijqUsKIaZyo00+FrSMQSRuUCy479jwL64vuRzMI0hXaORlYMJN6vu8ux1br cPXtFwANxt9Kj67OK7JCD+xpj5DSZLQxBHWgko1IGZITuojOitzYU1rM7xtXYdX90dBo8n5GbQvGY ZRYXY9LQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odAHt-00AgOy-8D; Tue, 27 Sep 2022 13:06:13 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odAHp-00AgM3-I8 for linux-arm-kernel@lists.infradead.org; Tue, 27 Sep 2022 13:06:10 +0000 Received: by mail-pl1-x634.google.com with SMTP id z20so2140693plb.10 for ; Tue, 27 Sep 2022 06:06:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:from:to:cc:subject:date; bh=tVImipPJ55LLlj3hxov+6J9Uas9BlzTbH/QBaoiYcnE=; b=AeFiLZSELiOLu0C/WY7j3qNn2XbPtZX/1DfSK5wxjFb2rqwPO7CvvZtAFF5v6/7J26 ahCqqp2F9wNI5OYX7qy/ObhCyFoh9fcBwqqwDTOmQ3Szz628RGrS+W9AFjoVJocXlWki VC0GYuee8hoFp6tnnZjb+BQvkFkX4acVrRZQaXEcy3Crna/0t54Jbazxa/CYEy/0/zFu 2lndzQwEpvpkb26lSSoBm5VVsMti9KIfqB8rnh9R4Sn70IUDgJCGjP5FzkG0xZM/8Ujz ktOS6zIlcVHVVfda96Denge0ZrYEMhecJgtt3RQnWSFrUZInrw19D5HLdT/lXGWs6zAx AlBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:in-reply-to:references :user-agent:from:x-gm-message-state:from:to:cc:subject:date; bh=tVImipPJ55LLlj3hxov+6J9Uas9BlzTbH/QBaoiYcnE=; b=5zULEtvHcZf6pQtLsxI2v6nFMfvBVkyaj8zEw818XL4S25/YG6cp9UQ09QJ/x7Jh6h GrJUE1K7mex6I5g/9Nvb4iCcig6fql5LpgpvjZhDRwZWbTCMY6sQb+TGTbgdozJbxi/o GeqQEggl8nYSq2jpHyarU7v7EZc/Y7tiGF7XCm97hck93ocGhqw+D5CiIR+Uiq2pC/lY yaMaI73ECT+odGtpKBKBJRq347PIq7JlHkGD/cTVgrMw3Wd+tBZnML4rRwSPD0YCZNSQ rIZauWCeMcMfHGBR3XrgMSrhuoYeaQlakPon0unHpfq810Sxu/x2vyv3tgpxEQ2jxSwB 34Wg== X-Gm-Message-State: ACrzQf25+bzThvFsPgcpTEf3qeli4P0KNXzWP+tYn8KXF5rs8zLTE/CK OphYtR9JdR3MbdcHBxSYTbD13FWkqllbQU1J7ouKVA== X-Google-Smtp-Source: AMsMyM6iYfFfRkY7ZCfN7iH6SfIok108DtV5xTUiUrfRhR4EUYS3wDXnryle8l6ZhFGMR+ScZmNr7PCxr1+tKvPRj2I= X-Received: by 2002:a17:90b:2643:b0:205:bd0d:bdff with SMTP id pa3-20020a17090b264300b00205bd0dbdffmr4399905pjb.99.1664283966835; Tue, 27 Sep 2022 06:06:06 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 27 Sep 2022 06:06:06 -0700 From: Guillaume Ranquet User-Agent: meli 0.7.2 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-5-4844816c9808@baylibre.com> <32c4822a-a094-5fa3-c2af-e515bf897937@collabora.com> In-Reply-To: <32c4822a-a094-5fa3-c2af-e515bf897937@collabora.com> MIME-Version: 1.0 Date: Tue, 27 Sep 2022 06:06:06 -0700 Message-ID: Subject: Re: [PATCH v1 05/17] drm/mediatek: hdmi: use a syscon/regmap instead of iomem To: AngeloGioacchino Del Regno , Matthias Brugger , Vinod Koul , Stephen Boyd , David Airlie , Rob Herring , Philipp Zabel , Krzysztof Kozlowski , Daniel Vetter , Chunfeng Yun , CK Hu , Jitao shi , Chun-Kuang Hu , Michael Turquette , Kishon Vijay Abraham I Cc: linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, Pablo Sun , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, Mattijs Korpershoek , linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, devicetree@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220927_060609_610735_1E52E5C3 X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, 20 Sep 2022 12:18, AngeloGioacchino Del Regno 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 >> >> 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; > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel