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 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AF462CA9ED1 for ; Thu, 31 Oct 2019 14:26:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7047221835 for ; Thu, 31 Oct 2019 14:26:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728215AbfJaO0Z (ORCPT ); Thu, 31 Oct 2019 10:26:25 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48910 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727922AbfJaO0Y (ORCPT ); Thu, 31 Oct 2019 10:26:24 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: aratiu) with ESMTPSA id 5EAB2290852 From: Adrian Ratiu To: linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-rockchip@lists.infradead.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Boris Brezillon Subject: [PATCH 1/4] drm: bridge: dw_mipi_dsi: access registers via a regmap Date: Thu, 31 Oct 2019 16:26:30 +0200 Message-Id: <20191031142633.12460-2-adrian.ratiu@collabora.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191031142633.12460-1-adrian.ratiu@collabora.com> References: <20191031142633.12460-1-adrian.ratiu@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the common bridge code and the two rockchip & stm drivers which currently use it to the regmap API in anticipation for further changes to make it more generic and add older DSI host controller support as found on i.mx6 based devices. No functional changes other than requiring the platform drivers to provide a regmap via their plat_data. Going further each platform driver can also add its own regmap configuration like for maximum write offsets, r/w callbacks or different register layouts. Suggested-by: Boris Brezillon Signed-off-by: Adrian Ratiu --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 189 +++++++++--------- .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 36 +++- drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 44 ++-- include/drm/bridge/dw_mipi_dsi.h | 2 +- 4 files changed, 155 insertions(+), 116 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index b6e793bb653c..4ef3e9038cc2 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