From patchwork Sat Jul 29 19:17:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 9870101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2D6056035E for ; Sat, 29 Jul 2017 19:21:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CEA527D29 for ; Sat, 29 Jul 2017 19:21:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1117B28789; Sat, 29 Jul 2017 19:21:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BF38527D29 for ; Sat, 29 Jul 2017 19:21:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3Wjn4fBJdxX6vnBFPEIEdPih6c32RPq0CdpptbQiN0g=; b=bzIZsQH2hDE9BR lr+Hiq98i9pgptUJIQDx0MP5sJtD4j76MY4PZe22Z8Ql7jVvdiUxchLDjqjhfcC/cBRCtRapgMjYP HqzOQiAozx/9mawTrwUyRgPHyh4B3t+W63WVFVzhetVbs+Fh0H+S43dBWLvTgHPp34Q89qwrPVNXO ST4X+pyaYcHcjmkkzLDA2MzqnD/7hjlDpwO+s9mVLyY710w5/rRGCfbqNaq+JCujAFr1qW34yahXu RYZcfi66LeaYmK+dBtmowwJZiRtIW0sX+pBVeUDvk/ogS6mJKuhQPgUufqfn3P2h1Yu5+yTdIMiyt JgTonqjL4ab2JJntphtw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dbXIm-0007sq-Gi; Sat, 29 Jul 2017 19:21:28 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dbXGo-0005Td-ST for linux-arm-kernel@lists.infradead.org; Sat, 29 Jul 2017 19:19:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=WdoJvcHAZkGttx0tiYKPArPsvQ9gMZq9Fy4X+T5wdXw=; b=D31L6LJMOZYOmNeqIivkdhPono 7CA1563+XBOqdjJO94undGXhvT4ldXBL9JOAAZzeOj/TJJKN543Ig3sxJtH64VWN3LJZjwpPZmH1R C5Nh2Y/vhPaqMz6hVFxA7/x4mP4HweGz+HlH+JQQN4kG5LKDh2+vQmUaYqHAUuU+e8FaUwfqKqK0R sDglM3vugNB5uFhacVHI2mQdifbEIr0RkZAbMGU0gMoikigBS98ndrSbCexHtmJpJ7yOiNKZDcraW SXkqF4ZB5u4ZzFRxMP1U1VoE9HBeDAm4WP3jIQBfTV2KbqKTO3eGMf+8Ysi/EnsbCZHXo8tWJAJiN YDpMNWMA==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:58148 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-SHA256:128) (Exim 4.89) (envelope-from ) id 1dbXCw-000DrP-JE; Sat, 29 Jul 2017 15:15:27 -0400 From: David Lechner To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org Subject: [PATCH 3/6] drm/tinydrm: rename mi028qt module to mipi-panel Date: Sat, 29 Jul 2017 14:17:47 -0500 Message-Id: <1501355870-13960-4-git-send-email-david@lechnology.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501355870-13960-1-git-send-email-david@lechnology.com> References: <1501355870-13960-1-git-send-email-david@lechnology.com> MIME-Version: 1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - lists.infradead.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170729_121927_222727_474E0874 X-CRM114-Status: GOOD ( 17.40 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-fbdev@vger.kernel.org, David Lechner , Kevin Hilman , David Airlie , Sekhar Nori , linux-kernel@vger.kernel.org, Rob Herring , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This renames the mi028qt module to mipi-panel so that it can be used for other types of panels as well. There is no reason to copy a bunch of boiler-plate code for each panel or controller. Signed-off-by: David Lechner --- .../devicetree/bindings/display/mipi-panel.txt | 27 ++ .../bindings/display/multi-inno,mi0283qt.txt | 27 -- MAINTAINERS | 6 +- drivers/gpu/drm/tinydrm/Kconfig | 12 +- drivers/gpu/drm/tinydrm/Makefile | 2 +- drivers/gpu/drm/tinydrm/mi0283qt.c | 283 -------------------- drivers/gpu/drm/tinydrm/mipi-panel.c | 284 +++++++++++++++++++++ 7 files changed, 323 insertions(+), 318 deletions(-) create mode 100644 Documentation/devicetree/bindings/display/mipi-panel.txt delete mode 100644 Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt delete mode 100644 drivers/gpu/drm/tinydrm/mi0283qt.c create mode 100644 drivers/gpu/drm/tinydrm/mipi-panel.c diff --git a/Documentation/devicetree/bindings/display/mipi-panel.txt b/Documentation/devicetree/bindings/display/mipi-panel.txt new file mode 100644 index 0000000..01d6ea9 --- /dev/null +++ b/Documentation/devicetree/bindings/display/mipi-panel.txt @@ -0,0 +1,27 @@ +MIPI DBI compatible display panel + +Required properties: +- compatible: "multi-inno,mi0283qt". + +The node for this driver must be a child node of a SPI controller, hence +all mandatory properties described in ../spi/spi-bus.txt must be specified. + +Optional properties: +- dc-gpios: D/C pin. The presence/absence of this GPIO determines + the panel interface mode (IM[3:0] pins): + - present: IM=x110 4-wire 8-bit data serial interface + - absent: IM=x101 3-wire 9-bit data serial interface +- reset-gpios: Reset pin +- power-supply: A regulator node for the supply voltage. +- backlight: phandle of the backlight device attached to the panel +- rotation: panel rotation in degrees counter clockwise (0,90,180,270) + +Example: + display@0{ + compatible = "multi-inno,mi0283qt"; + reg = <0>; + spi-max-frequency = <32000000>; + rotation = <90>; + dc-gpios = <&gpio 25 0>; + backlight = <&backlight>; + }; diff --git a/Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt b/Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt deleted file mode 100644 index eed48c3..0000000 --- a/Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt +++ /dev/null @@ -1,27 +0,0 @@ -Multi-Inno MI0283QT display panel - -Required properties: -- compatible: "multi-inno,mi0283qt". - -The node for this driver must be a child node of a SPI controller, hence -all mandatory properties described in ../spi/spi-bus.txt must be specified. - -Optional properties: -- dc-gpios: D/C pin. The presence/absence of this GPIO determines - the panel interface mode (IM[3:0] pins): - - present: IM=x110 4-wire 8-bit data serial interface - - absent: IM=x101 3-wire 9-bit data serial interface -- reset-gpios: Reset pin -- power-supply: A regulator node for the supply voltage. -- backlight: phandle of the backlight device attached to the panel -- rotation: panel rotation in degrees counter clockwise (0,90,180,270) - -Example: - mi0283qt@0{ - compatible = "multi-inno,mi0283qt"; - reg = <0>; - spi-max-frequency = <32000000>; - rotation = <90>; - dc-gpios = <&gpio 25 0>; - backlight = <&backlight>; - }; diff --git a/MAINTAINERS b/MAINTAINERS index f66488d..812ffd0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4315,11 +4315,11 @@ M: Dave Airlie S: Odd Fixes F: drivers/gpu/drm/mgag200/ -DRM DRIVER FOR MI0283QT +DRM DRIVER FOR MIPI DBI compatible panels M: Noralf Trønnes S: Maintained -F: drivers/gpu/drm/tinydrm/mi0283qt.c -F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt +F: drivers/gpu/drm/tinydrm/mipi-panel.c +F: Documentation/devicetree/bindings/display/mipi-panel.txt DRM DRIVER FOR MSM ADRENO GPU M: Rob Clark diff --git a/drivers/gpu/drm/tinydrm/Kconfig b/drivers/gpu/drm/tinydrm/Kconfig index 3504c53..394519b 100644 --- a/drivers/gpu/drm/tinydrm/Kconfig +++ b/drivers/gpu/drm/tinydrm/Kconfig @@ -12,10 +12,14 @@ menuconfig DRM_TINYDRM config TINYDRM_MIPI_DBI tristate -config TINYDRM_MI0283QT - tristate "DRM support for MI0283QT" +config TINYDRM_MIPI_PANEL + tristate "DRM support for MIPI DBI compatible display panels" depends on DRM_TINYDRM && SPI select TINYDRM_MIPI_DBI help - DRM driver for the Multi-Inno MI0283QT display panel - If M is selected the module will be called mi0283qt. + DRM driver for the MIPI DBI compatible display panels. + + Supported panels include: + * Multi-Inno MI0283QT + + If M is selected the module will be called mipi-panel. diff --git a/drivers/gpu/drm/tinydrm/Makefile b/drivers/gpu/drm/tinydrm/Makefile index 7a3604c..7eae65e 100644 --- a/drivers/gpu/drm/tinydrm/Makefile +++ b/drivers/gpu/drm/tinydrm/Makefile @@ -4,4 +4,4 @@ obj-$(CONFIG_DRM_TINYDRM) += core/ obj-$(CONFIG_TINYDRM_MIPI_DBI) += mipi-dbi.o # Displays -obj-$(CONFIG_TINYDRM_MI0283QT) += mi0283qt.o +obj-$(CONFIG_TINYDRM_MIPI_PANEL) += mipi-panel.o diff --git a/drivers/gpu/drm/tinydrm/mi0283qt.c b/drivers/gpu/drm/tinydrm/mi0283qt.c deleted file mode 100644 index 2680dab..0000000 --- a/drivers/gpu/drm/tinydrm/mi0283qt.c +++ /dev/null @@ -1,283 +0,0 @@ -/* - * DRM driver for Multi-Inno MI0283QT panels - * - * Copyright 2016 Noralf Trønnes - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include