Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp996508rwb; Tue, 27 Sep 2022 07:12:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7FODF+LQ0OrZQnvc6+vwCvvMweJq5tH7ZmJR3uLWBSNxd10oiqnU4egE3RPJijj3XakkDj X-Received: by 2002:a05:6402:2949:b0:451:fabf:d88a with SMTP id ed9-20020a056402294900b00451fabfd88amr27390769edb.324.1664287940551; Tue, 27 Sep 2022 07:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664287940; cv=none; d=google.com; s=arc-20160816; b=MUlquLUshG/l1HnFbBhe+d8aEnsZzuvjQC6p1CEy0U3HgmkRgknJ+zKZrFnwIKkOO0 WIFPnHFftziQmfsxmg6mw59yWxYro2V8ScdYGGYrgIHUZV59FuPINCUzlfWlAWABTuTU AlxJ1krPSRatAguNEprfYRk8TVuYzpJrqdG+1GlHEOQndJhEypvb+S67Q+4UEwER7rXB hHhXELZoTm+M5FW9strgSxY1VrzowEWBm0ZoT4B1hTj2jYzY+qehDk+GU6IPiYStdevV Eub0pa2jRbpvUUVe4WHPgqi1VT78LIstHe2HPE3vFq9FCND+HZ9S0aGGqWquW8Z6ZcEx PiMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:mime-version :in-reply-to:references:user-agent:from:dkim-signature; bh=tVImipPJ55LLlj3hxov+6J9Uas9BlzTbH/QBaoiYcnE=; b=iCIK8XebfaRT+MTbfBTjUY8zRc0aUDhbnN2Q+0FKNXHvfxrc/TnsdqCtePRKWxRQeT o4iM3zFDC9Kw+h/5nGzQjWCwNPKoLMpMjVNXQ+i1tL9dXvXqSdNhhgZ7zu3l8Qobd6eM vDgHtJbjpOPzHKvqAIam56g6xMgjLzwNLtsVkeisk6SmNBVdMMhTa8XQSkFz1I9ZzumV rR8SpiJlVhBbcL+FSLy7D23TG914WmMs8kkCyhf96NTFByxsSjqRVqHs9IdXhyN37eYM QnCQ6aOcL0UgXjy8lriIk32CEDVX17jW1VMvqRD3fCujEQapvmi7vU09x3xn9K5e4irq auoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=AeFiLZSE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w12-20020a50c44c000000b0044dbb9afe1fsi1633769edf.467.2022.09.27.07.11.42; Tue, 27 Sep 2022 07:12:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=AeFiLZSE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231322AbiI0NGN (ORCPT + 99 others); Tue, 27 Sep 2022 09:06:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232203AbiI0NGI (ORCPT ); Tue, 27 Sep 2022 09:06:08 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67D37155433 for ; Tue, 27 Sep 2022 06:06:07 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id x1-20020a17090ab00100b001fda21bbc90so15498782pjq.3 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=UgPvwh5BktNXZJ6gabRKRon5PHAjJKNThrm5grR9Bl+GQMiFWnNvH4UdLIDhqECxqE p4T2MMt0tZyIAUe/wz3q7abbrnn4Dik2+RKpUo9DiyIPkYmSWeUgsF26DwkMvel9A1OV PCwOMdSFYSY9IO8I/J2TLaAnm9aC49BcWtrvziqTACLjZ645Mgi1S/NuRrDbbNx519MY z/Oz7TjItg1OfHbqtEKzwk7DjrP7ptvelCCfHT1xAmiXMDyKfd0oxy/3+SNViwaHv9ZH 57bjpFLANsXi3eRkXi27x59PyApn8PAnFngk7jWa1tdmd1Fk+AH0owW0jSO+rcCFHBcs WhrQ== X-Gm-Message-State: ACrzQf1MJJJAy5160xnHbsOh8O0I9Ca92aoUtuC8yRD0fwRmYhtCBtFu LcJFbVUazg6N0E4SRhkSb0lL0nYuIE8TSu+ZiPGQBA== 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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; > >