From patchwork Tue Mar 25 14:09:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3887931 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA076BF549 for ; Tue, 25 Mar 2014 14:10:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90034201F2 for ; Tue, 25 Mar 2014 14:10:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19954201DE for ; Tue, 25 Mar 2014 14:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752397AbaCYOJ6 (ORCPT ); Tue, 25 Mar 2014 10:09:58 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:47610 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751854AbaCYOJ4 (ORCPT ); Tue, 25 Mar 2014 10:09:56 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N2Z005NKWOB7400@mailout2.w1.samsung.com>; Tue, 25 Mar 2014 14:09:47 +0000 (GMT) X-AuditID: cbfec7f5-b7fc96d000004885-84-53318e3102b7 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id C3.67.18565.13E81335; Tue, 25 Mar 2014 14:09:53 +0000 (GMT) Received: from AMDC1061.digital.local ([106.116.147.88]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0N2Z000Y7WOC1O50@eusync1.samsung.com>; Tue, 25 Mar 2014 14:09:53 +0000 (GMT) From: Andrzej Hajda To: dri-devel@lists.freedesktop.org Cc: Andrzej Hajda , Marek Szyprowski , Kyungmin Park , Inki Dae , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Grant Likely , Thierry Reding , devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND...), linux-samsung-soc@vger.kernel.org (moderated list:ARM/SAMSUNG ARM A...) Subject: [PATCH v2 2/3] drm/panel: add ld9040 driver Date: Tue, 25 Mar 2014 15:09:33 +0100 Message-id: <1395756573-956-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1395749436-24697-3-git-send-email-a.hajda@samsung.com> References: <1395749436-24697-3-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrDLMWRmVeSWpSXmKPExsVy+t/xy7qGfYbBBp1dFha31p1jtZh/BEhc +fqezaL/zUJWiwN/djBanHu1ktFi0v0JLBZnm96wW8w4v4/JYu2Ru+wWS69fZLKYMH0ti0Xr 3iPsFrd/8znweayZt4bR43JfL5PHyuVf2Dw2repk87hzbQ+bx/3u40wevc3v2Dz6tqxi9Pi8 SS6AM4rLJiU1J7MstUjfLoErY/qVXpaCFxkVr1dsZGpgfBbaxcjJISFgInHu13Q2CFtM4sK9 9UA2F4eQwFJGiUUtPSwQTh+TxPOTk1hBqtgENCX+br4J1iEioCzxd+IqRhCbWWAfi8TM42Ig tjDQ1IkLrzGD2CwCqhJH5k9iArF5BRwl/h94zgqxTUFi2Ze1YDWcAi4SjRPOg80UEnCWWHhw O+MERt4FjAyrGEVTS5MLipPSc430ihNzi0vz0vWS83M3MUJC+OsOxqXHrA4xCnAwKvHwbjA1 CBZiTSwrrsw9xCjBwawkwuvTaRgsxJuSWFmVWpQfX1Sak1p8iJGJg1OqgbHlGec8jpD5t86K 6F184dVekvydsTfMT75oadSR+my2FYd+uzztvZa/ztdcM7tb8skmgbQFb0/1prd4pjz/13Jt bmG33MXvTeUhXV8kvjyXW8LcLSIzc5tB3dMD8+RUeJaz6V2+9jFq2c0nbh859OtCOkXv/I9h fl5z7NDrWhsdEb2/1q4RfEosxRmJhlrMRcWJAGUBfgQ/AgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The patch adds LD9040 parallel RGB panel driver with SPI control interface. The driver uses drm_panel framework. Signed-off-by: Andrzej Hajda --- v2: removed useless include --- drivers/gpu/drm/panel/Kconfig | 6 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ld9040.c | 376 +++++++++++++++++++++++++++++++++++ 3 files changed, 383 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ld9040.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 3e0f13d..94cc0c7 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -16,4 +16,10 @@ config DRM_PANEL_SIMPLE that it can be automatically turned off when the panel goes into a low power state. +config DRM_PANEL_LD9040 + tristate "LD9040 RGB/SPI panel" + depends on DRM && DRM_PANEL + depends on OF + select VIDEOMODE_HELPERS + endmenu diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index af9dfa2..4f7dfce 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o +obj-$(CONFIG_DRM_PANEL_LD9040) += panel-ld9040.o diff --git a/drivers/gpu/drm/panel/panel-ld9040.c b/drivers/gpu/drm/panel/panel-ld9040.c new file mode 100644 index 0000000..1f1f837 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ld9040.c @@ -0,0 +1,376 @@ +/* + * ld9040 AMOLED LCD drm_panel driver. + * + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * Derived from drivers/video/backlight/ld9040.c + * + * 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