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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 15D82C54EE9 for ; Tue, 27 Sep 2022 13:06:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232330AbiI0NGO (ORCPT ); Tue, 27 Sep 2022 09:06:14 -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-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 Content-Type: text/plain; charset="UTF-8" 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; > > 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 2D660C07E9D for ; Tue, 27 Sep 2022 13:06:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4217710E920; Tue, 27 Sep 2022 13:06:09 +0000 (UTC) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65E8910E92C for ; Tue, 27 Sep 2022 13:06:07 +0000 (UTC) Received: by mail-pl1-x62c.google.com with SMTP id iw17so9065016plb.0 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=oSrc1SKW3LxVX3iicPf1ARVzoefCZEAjD+icRJ48mLyW6F5iMzwQxEXsips38KxATX cQGDirAOQvhVKX+Rk5oFiIF4AclDXFhCDERTD/7Ag6qginm7jnwBSyKab1OBJBNN7y8r uE6qi0JuhFm3wIK1Mr1eSu0wEEXyF+EX7YG/4AvW5ReeovvqdkZAgXcUkp+6EKqf3uLA U7Ndk2XKy+ROruQu0eL8BnY6ISu5f1rAWQ/VdnYj2YfG3MOYY14TNHcrlpQUr6ibc2s2 6Rk0wPMpIbToQZmttkpFJOv8kWxdEnDpkBaz3i28jx1zHdE4VwDVeQJrqLCRmI2y99xD FTmA== X-Gm-Message-State: ACrzQf25bXzMU2EaVC39bUBNtwVZ44LDvsZCKkLgZ8mEnk9pyqaVAYKY NON3hB4IB+Zccr1c8q0cIcSElGTuDPTcBYjmyursPQ== 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 Content-Type: text/plain; charset="UTF-8" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Mattijs Korpershoek , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-phy@lists.infradead.org, Pablo Sun , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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; > > 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 5E571C07E9D for ; Tue, 27 Sep 2022 13:06:23 +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=j0y0993JlwVcsXpzImAbbH2R35Tkv1XoW+gVg5/2jM0=; b=MgZDY3lQyrklQ8H9dBEMXBg/+n SD5LyYQXtqsJ/PpWE0HOZnujDZvpURkQrRNyNDhOvTHtc3UOl9r1A30cwhb2z+PkV5wHO3V8Kajfs DqM+phTTEPR20Nro4bvyVxI8E2Iko4efUW//TaS0OPDs6FU12nlOToLzyKy4h9fBclX5UwRD6djp/ ZLybXJ2NyvnaeiiB0SgLT+cBt8/oF1/B3xw9GJ+q8Wzt3JRznflcjUIAbkxCffFFUVJ6l8e9kPL1k d9bJP3uGO51oOdOAmRvhig4FzopClhifnTFaysbwK/+uA0mX2QHWIVKzDbwvgIWfj8tYYW2Xer1Kx wRkwX0jQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1odAI2-00AgTS-Px; Tue, 27 Sep 2022 13:06:22 +0000 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1odAHp-00AgM4-TP for linux-phy@lists.infradead.org; Tue, 27 Sep 2022 13:06:11 +0000 Received: by mail-pl1-x635.google.com with SMTP id x1so9024477plv.5 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=Pndeado6x8YGTXlaxrfKg7WyQnhRpw921tvIQ7xPXy18MCoPOhs60RSUfmBTXEA9Jb /J3/XJcdl9ugOG96NHGLxszL5nB2Aq5YEd/G+dBPR7G0GwajInfSWG6kHyM017lwv2mV 2ghV7DdB988bqPqiwtgFTxiUH19UrWCCkBYlZSRoOuDQJUQ6x/EN8sIpZOYLg7RnjtFR JAXgdG0TRmEs3JDR8c4CeXZj9ncS69wX1sRjSPFj8HUNGSZ3s+ZmAlquy4b15CQQRVRL yiK9W9GaEQwSG1usfMjd/BnGJ1M1rD/xcwYQkhn/ERcseLpqQET7z/oATNM4QnAn0XIT CJEQ== X-Gm-Message-State: ACrzQf2Z3HInP54ZQNLjVRVBX8LBBhfVKus1H6ytAzS+uTfl5rMnJ+S4 PlGmIhqLSgiSOcvjUI3E45TPDvYyvr2TZBEKx7lL3w== 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_990906_4B3787C5 X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=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-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy 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