Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp1223487ybx; Thu, 31 Oct 2019 07:27:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6d2NS7Wn/vS0VVHx6nuK2u6K2+MftMpOuuDqt7eKDC38ARYcPA6IjK5TvOsBqozQAfopH X-Received: by 2002:a17:906:4cd2:: with SMTP id q18mr4164865ejt.319.1572532053646; Thu, 31 Oct 2019 07:27:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572532053; cv=none; d=google.com; s=arc-20160816; b=USD4OuOfnLJvaDXYIfROTtbzcV9QyJVVq8svXTlN6LSnC0v9lrmjoDVHX7AA5q0vrm DgEiCuI+Dzw/aYb9iZamqgx15Sho44baHBexW/QAqXVpeX9YPq93+UjUYRYzQYRGSxYz obajmpLvcUyRSPmfTZe2thr3748Diyr3FgT2s4O3SKkk9QE+ZBCkA/CkdMsinDxfMRlL 3BbLDC7oYLXGLJtgBTy2kuyKBxLLnECzKVSZnl/vm8xYtFv7exwFdOVQNVqoKagTaEdx h2w4+qOOzjXxrIQARLkcWF5Lp13IFFZB6cNmtlVczSvaHWALxmS/U6P9zlSAjhaLkezU FlwA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=HOyEbKTDQn7tu5VrTx/xKPWeCoRSLpXVoT6K5jCS16U=; b=X3SDEqdB/tpNKYWgnqkO6+hjt025OmpwOIYfVmcCAgbErAXH13s4YSZcgw5FihKCP8 ealAeWjL3XSLyOjbIAWydMs1d4iyuDUZesZvaOACQxfaiKyeW21BvxsQSag28Sqgarfw mvYNk4DiITyYz8Fgm0uRqk0A3VNMLOfa9XgO6ZPz6ill7e0P0NB0TqazJm1IiYO1EC9p A1y4QtoWVXav6rwu9LUFtfJ6DMqBUKhCKrzW1iGX5w1Zvg/N/F06paJnAjA2+K6GaDwX Gn5SwJReiBeGluxD0VcMjE3uGiOvAnHuzRxlJ5DI8ZHwEvaNPaTAohDJ7Dx1lcGWppat VErg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id f29si3892368ejj.110.2019.10.31.07.27.09; Thu, 31 Oct 2019 07:27:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728209AbfJaO0Z (ORCPT + 99 others); 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