Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3701404rwb; Tue, 20 Sep 2022 03:32:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7vfq+MVH8MISBISKWNBCvSSlSZKF8H58ilaS7oH61jckDtvEnaTOc2QZ7z+bAFWZSx8Agy X-Received: by 2002:a17:906:ef8b:b0:77f:2b14:6eef with SMTP id ze11-20020a170906ef8b00b0077f2b146eefmr16318458ejb.612.1663669979668; Tue, 20 Sep 2022 03:32:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663669979; cv=none; d=google.com; s=arc-20160816; b=yD7+jPuWYbmTnsBqydPljhXGre9Y2ZiJE/R1/Jtj4bot2wD9rDfQTnyfdL387xj0E+ YIO/kngP5HvARbZGqZqLCbC0nHXVaci1PKNUP69C4qvaunRA/6CCLuL7MjifAWlkTCha uRIOdUoZIysSjne529UMRzaCE+AH+YxdJ3WszR3fS0j2b0yeCUrlnSs+nvkt5Lc6KJu1 Z2J575n/Oh2Evf6Op93D9UUyJ+o0xpVPC3ZW+A6xqs/4X7HrQqml1WI7beUB4T6XjXMY dYGzwcKd838jowwDYp6ikZeL0aqpxRHNaY/Iu+oTYifKatkbOAodEpcva2FUap91X+Jq wueA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=NEofSzy3wClfu+J+EGfVKlyaoec7bMBb4Wy1LHIT2VM=; b=pKlBtHjSz6SgINIW0p7nC4IEKaUeQuW5QmHRfK5EZjgxPSyBETqKjOlCz940zfjgah KH7j2Pn0rhezkksaNVCyG7iDViVui5tVzpaaB5qI4mipwbVQAc3dC1wSqLz8G1hRqO8k QXTfGT1qZnKDH2vyODyeq8kfa91gWYymeRUM6uxFCVDrDR/qQVLIhvKqigPo11gK5dnB h/0xguBNttKZGajwXhN67xav5WR2EpN88TbVemo6/o/+ven6pPWtsgO4bRtotg5qj9K3 uKqlDdMfKKGLWSmbWtmoBmJWo19aAPncTOJH4/zXUngBHeYo+KYpUeRFzBGJmUlkoDvN ONSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=SaWh1AMt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020aa7d581000000b00448b72be304si1158261edq.64.2022.09.20.03.32.31; Tue, 20 Sep 2022 03:32:59 -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=@collabora.com header.s=mail header.b=SaWh1AMt; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230434AbiITKSz (ORCPT + 99 others); Tue, 20 Sep 2022 06:18:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230143AbiITKSw (ORCPT ); Tue, 20 Sep 2022 06:18:52 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36CFE6D9CA; Tue, 20 Sep 2022 03:18:50 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 1FA956600368; Tue, 20 Sep 2022 11:18:47 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1663669128; bh=B7xp7LNcnfbdR5oIkfuWVwdzNL7IbuXIGjam7V0vK40=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SaWh1AMtnitMfo9coVDZcsdbltKYBYXw1LJst710ha2g5XKkVzVvVVl3mkwpxxGgm FthnwnKgggKvZyl2L4nVuOYLOoub08A7CWFtDfYuO0n39YHGmR+N89bIZ9WBXTkFfh /z+1CbJhG5nCl6CQS318lSxAGSRxzRwG8pTE8k5bw0LHZhqk3cFrB59Skd3+l7bnlS Nmg6BNozuvtjwsD94fpJMY90oSG3pr5dVxXqS3/fzpUoNpBsct05N4mWFKrVqR51ab xaS5ot7qE+WxpH0LABFAaBp0eYFgvd3dJUPoITu1R6pvxN3hLVfvgDL+LXTZwwaZ4K ewVvTrcPWH7vw== Message-ID: <32c4822a-a094-5fa3-c2af-e515bf897937@collabora.com> Date: Tue, 20 Sep 2022 12:18:44 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v1 05/17] drm/mediatek: hdmi: use a syscon/regmap instead of iomem Content-Language: en-US To: Guillaume Ranquet , 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 , Matthias Brugger 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 References: <20220919-v1-0-4844816c9808@baylibre.com> <20220919-v1-5-4844816c9808@baylibre.com> From: AngeloGioacchino Del Regno In-Reply-To: <20220919-v1-5-4844816c9808@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 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() Regards, Angelo > if (IS_ERR(hdmi->regs)) { > ret = PTR_ERR(hdmi->regs); > goto put_device;