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: 795269 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=lechnology.com header.i=@lechnology.com header.b="D31L6LJM"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xKb8v6XWjz9t1y for ; Sun, 30 Jul 2017 05:18:23 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751663AbdG2TSP (ORCPT ); Sat, 29 Jul 2017 15:18:15 -0400 Received: from vern.gendns.com ([206.190.152.46]:50995 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751597AbdG2TSK (ORCPT ); Sat, 29 Jul 2017 15:18:10 -0400 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 Cc: David Lechner , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , David Airlie , Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@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 - vger.kernel.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: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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