From: Andrzej Hajda Subject: [RFC v2 PATCH] mipi-dsi-bus: add MIPI DSI bus support Date: Mon, 18 Nov 2013 17:25:23 +0100 Message-ID: <1384791923-11424-1-git-send-email-a.hajda@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 30124FB083 for ; Mon, 18 Nov 2013 08:25:45 -0800 (PST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MWG00IMJWAIFZC0@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 18 Nov 2013 16:25:42 +0000 (GMT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: Thierry Reding Cc: dri-devel@lists.freedesktop.org, Andrzej Hajda , Kyungmin Park , tomi.valkeinen@ti.com List-Id: dri-devel@lists.freedesktop.org MIPI DSI bus allows to model DSI hosts and DSI devices using Linux bus. Signed-off-by: Andrzej Hajda Signed-off-by: Kyungmin Park --- Hi, This is my implementation of mipi dsi bus. The first time it was posted as a part of CDF infrastructure [1], but if it can be merged independently I will be glad. I have not addressed yet Bert's comments, but I think it should be easy, once we have agreement how to implement it. There are also working drivers which uses this bus: - Exynos DSI master, - s6e8aa0 panel. I will post them later. [1] http://www.mail-archive.com/dri-devel@lists.freedesktop.org/msg45252.html Changes: v2: - set_power callback removed (its role is passed to RUNTIME_PM), - changed transfer ops parameters to struct, - changed source location, - minor fixes Regards Andrzej --- drivers/gpu/drm/Kconfig | 4 + drivers/gpu/drm/Makefile | 2 + drivers/gpu/drm/drm_mipi_dsi.c | 344 +++++++++++++++++++++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 154 ++++++++++++++++++ 4 files changed, 504 insertions(+) create mode 100644 drivers/gpu/drm/drm_mipi_dsi.c create mode 100644 include/drm/drm_mipi_dsi.h diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index f864275..58a603d 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -20,6 +20,10 @@ menuconfig DRM details. You should also select and configure AGP (/dev/agpgart) support if it is available for your platform. +config DRM_MIPI_DSI + tristate + default y + config DRM_USB tristate depends on DRM diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index cc08b84..6bab99c 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -19,6 +19,7 @@ drm-$(CONFIG_COMPAT) += drm_ioc32.o drm-$(CONFIG_DRM_GEM_CMA_HELPER) += drm_gem_cma_helper.o drm-$(CONFIG_PCI) += ati_pcigart.o +drm-mipi-dsi-y := drm_mipi_dsi.o drm-usb-y := drm_usb.o drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o @@ -31,6 +32,7 @@ obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o CFLAGS_drm_trace_points.o := -I$(src) obj-$(CONFIG_DRM) += drm.o +obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o obj-$(CONFIG_DRM_USB) += drm_usb.o obj-$(CONFIG_DRM_TTM) += ttm/ obj-$(CONFIG_DRM_TDFX) += tdfx/ diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c new file mode 100644 index 0000000..ead35da --- /dev/null +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -0,0 +1,344 @@ +/* + * MIPI DSI Bus + * + * Copyright (C) 2012, Samsung Electronics, Co., Ltd. + * Andrzej Hajda + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include