From patchwork Wed Mar 26 08:17:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 3892361 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BCF939F334 for ; Wed, 26 Mar 2014 08:17:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 11C3E201BA for ; Wed, 26 Mar 2014 08:17:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E25720165 for ; Wed, 26 Mar 2014 08:17:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750793AbaCZIRq (ORCPT ); Wed, 26 Mar 2014 04:17:46 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:13626 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750792AbaCZIRl (ORCPT ); Wed, 26 Mar 2014 04:17:41 -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 <0N3100DL1B175C10@mailout2.w1.samsung.com>; Wed, 26 Mar 2014 08:17:31 +0000 (GMT) X-AuditID: cbfec7f5-b7fc96d000004885-c4-53328d224b08 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 14.DF.18565.22D82335; Wed, 26 Mar 2014 08:17:38 +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 <0N3100835B18MK90@eusync1.samsung.com>; Wed, 26 Mar 2014 08:17:38 +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 v3 2/3] drm/panel: add ld9040 driver Date: Wed, 26 Mar 2014 09:17:18 +0100 Message-id: <1395821838-2259-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 1.8.3.2 In-reply-to: <1395756573-956-1-git-send-email-a.hajda@samsung.com> References: <1395756573-956-1-git-send-email-a.hajda@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFLMWRmVeSWpSXmKPExsVy+t/xy7pKvUbBBnuvq1rcWneO1WL+ESBx 5et7Nov+NwtZLQ782cFoce7VSkaLSfcnsFicbXrDbjHj/D4mi7VH7rJbLL1+kcliwvS1LBat e4+wW9z+zefA57Fm3hpGj8t9vUweK5d/YfPYtKqTzePOtT1sHve7jzN59Da/Y/Po27KK0ePz JrkAzigum5TUnMyy1CJ9uwSujONNC9gKZmdWvFqzg7mBsS+si5GTQ0LAROLb11usELaYxIV7 69lAbCGBpYwS/7fLdjFyAdl9TBJNa54wgiTYBDQl/m6+CVYkIqAs8XfiKrA4s8A+FomZx8VA bGGgoR8fPQCrYRFQBRr6CczmFXCS+PT+FdQyBYllX9Yyg9icQPGfmx8AxTmAljlK7NjnPIGR dwEjwypG0dTS5ILipPRcI73ixNzi0rx0veT83E2MkPD9uoNx6TGrQ4wCHIxKPLwWfYbBQqyJ ZcWVuYcYJTiYlUR4g5uNgoV4UxIrq1KL8uOLSnNSiw8xMnFwSjUwlnM+PnLZ707wzPAqK0+9 Ci61aw6vVK0Czj8PeX4xti6Bc5nKlf++/vxn/vxjLdJZ3rMiQib1/rH1XX4Nm0639/K8mnn+ 3Dlt5cXK6TKtE8sdrosJuLO65Uzap84kOLV4jV/d7rpHcy7MsLdsERPVWxKwypWPm2nqu51+ uUvt1l6y1Q10aZyixFKckWioxVxUnAgAVTh81T0CAAA= 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 v3: added SPI dependency to Kconfig --- drivers/gpu/drm/panel/Kconfig | 7 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ld9040.c | 376 +++++++++++++++++++++++++++++++++++ 3 files changed, 384 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..f0fcb62 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -16,4 +16,11 @@ 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 SPI + 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