From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Lechner Date: Sat, 29 Jul 2017 19:17:47 +0000 Subject: [PATCH 3/6] drm/tinydrm: rename mi028qt module to mipi-panel Message-Id: <1501355870-13960-4-git-send-email-david@lechnology.com> List-Id: References: <1501355870-13960-1-git-send-email-david@lechnology.com> In-Reply-To: <1501355870-13960-1-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: David Lechner , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , David Airlie , Rob Herring , Mark Rutland , Sekhar Nori , Kevin Hilman , linux-fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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