Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2967520ybz; Mon, 27 Apr 2020 07:45:18 -0700 (PDT) X-Google-Smtp-Source: APiQypLakL/RfV+c+tY4kjajK5KjAan4KGWjrqQQ8vouoYuOybzMyFgpHlWU7mLYfYYrLOIgKPhi X-Received: by 2002:a50:eb8e:: with SMTP id y14mr18553671edr.270.1587998718381; Mon, 27 Apr 2020 07:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587998718; cv=none; d=google.com; s=arc-20160816; b=GE0wI5Ic6VAQtDi8fHXGKsoDyidMiniIsuatO4292cdBQZB+Gh2yc7eR7nj9LD3Yjp PHczBUlNaAqCx7DPtdLeD1z/X6czZc5xf2SdU7UOQOvZHtZR5wl/rVvRtvd8ChvMCiz4 9EMt4zjwRi/3rDbjSJJEfIOaKavRn60OLUuSrZtnR+5XD3YTC8iSWdaGOgVLbObYZXpY GHrai5eq+TUb+0e7hgVY0cj3HLzyLApAxQP+/HI/Elmx5fBHe2t+FjBsR5Fg/2uZDMtR s0sfJWoekPb4ybqS0UDjza5QPrf44Et9PG5fkSCSIO/a7/hz04sUHKLkmKpkO8vqLaJE EJcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from; bh=wFBRJqRQANI4xwFbNJoQkVclODG5m6NJFGxrJ/7CpvE=; b=uPg1ikR9Y0IDXl8kfPgD6IW3pWKPx+Pa5PzYkgQkuSaXXPe++nJ8rYFAd5ae2gbnrL FTWynBoFEMD8BNNHXtI6STUNwLTaUi+cx32tWPog3QhB4FTEQHyctWd7yA1wDr3hAHYr 9yntcfWDD58xZHFTzD/vk9KaNJUiC0B9YVtkB5NMIlv3B1gzYOjVIXaj7SE933IzkNia gTAdBPX3/RFvC6IGuDCXoCGP7P1Eq3Oq1ZjkptGMggw8K8AbAPzAZDCiK6tkuDevgGVV B3iGIQcOlvfg4psmhln427ciFongZv5je56ZSK4jY7M/h5/WtQDixoB+kxxCJucWlASE 9/bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d6si8792613ejr.400.2020.04.27.07.44.51; Mon, 27 Apr 2020 07:45:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727881AbgD0OlP (ORCPT + 99 others); Mon, 27 Apr 2020 10:41:15 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38756 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727012AbgD0OlO (ORCPT ); Mon, 27 Apr 2020 10:41:14 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 1C97F2A0C06 From: Enric Balletbo i Serra Subject: Re: [PATCH v8 01/10] drm: bridge: dw_mipi_dsi: add initial regmap infrastructure To: Adrian Ratiu , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, Laurent Pinchart Cc: Andrzej Hajda , Jonas Karlman , Jernej Skrabec , Heiko Stuebner , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-imx@nxp.com, kernel@collabora.com, linux-stm32@st-md-mailman.stormreply.com, Enric Balletbo Serra , Ezequiel Garcia , Adrian Pop , Arnaud Ferraris References: <20200427081952.3536741-1-adrian.ratiu@collabora.com> <20200427081952.3536741-2-adrian.ratiu@collabora.com> Message-ID: <919f7573-dac8-d75f-eb2a-e164a177141d@collabora.com> Date: Mon, 27 Apr 2020 16:41:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200427081952.3536741-2-adrian.ratiu@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adrian, Thank you for your patch and to apply the changes I requested On 27/4/20 10:19, Adrian Ratiu wrote: > In order to support multiple versions of the Synopsis MIPI DSI host > controller, which have different register layouts but almost identical > HW protocols, we add a regmap infrastructure which can abstract away > register accesses for platform drivers using the bridge. > > The controller HW revision is detected during bridge probe which will > be used in future commits to load the relevant register layout which > the bridge will use transparently to the platform drivers. > > Cc: Enric Balletbo Serra > Suggested-by: Ezequiel Garcia > Tested-by: Adrian Pop > Tested-by: Arnaud Ferraris > Signed-off-by: Adrian Ratiu Reviewed-by: Enric Balletbo i Serra > --- > Chnages since v7: > - Minor checkpatch line fix > > Changes since v6: > - Select REGMAP_MMIO in Kconfig (Enric) > - Drop unnecessary stack variable inits (Enric) > - Make bridge error ASAP after a bad revision read (Enric) > - Drop redundant read of hw_version in dphy_timing_config (Enric) > > New in v5. > --- > drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 210 ++++++++++-------- > 2 files changed, 121 insertions(+), 90 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/Kconfig b/drivers/gpu/drm/bridge/synopsys/Kconfig > index 21a1be3ced0f3..080146093b68e 100644 > --- a/drivers/gpu/drm/bridge/synopsys/Kconfig > +++ b/drivers/gpu/drm/bridge/synopsys/Kconfig > @@ -39,3 +39,4 @@ config DRM_DW_MIPI_DSI > select DRM_KMS_HELPER > select DRM_MIPI_DSI > select DRM_PANEL_BRIDGE > + select REGMAP_MMIO > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > index 5ef0f154aa7bd..34b8668ae24ea 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > > #include