From patchwork Fri Jul 11 14:18:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4535391 Return-Path: X-Original-To: patchwork-dri-devel@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 F13BEBEECB for ; Fri, 11 Jul 2014 15:35:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 116402025B for ; Fri, 11 Jul 2014 15:35:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 037BB20158 for ; Fri, 11 Jul 2014 15:35:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0A5FF6E089; Fri, 11 Jul 2014 08:35:49 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yh0-f44.google.com (mail-yh0-f44.google.com [209.85.213.44]) by gabe.freedesktop.org (Postfix) with ESMTP id 401F36E844 for ; Fri, 11 Jul 2014 07:23:35 -0700 (PDT) Received: by mail-yh0-f44.google.com with SMTP id f73so257313yha.17 for ; Fri, 11 Jul 2014 07:23:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UPTQXOEAIw6YlPkG6ssrLekDv+yJd7hiiBeGai8uBx0=; b=N8WahdGb5MFgNd/pgoRvbiqy0zMHG0Yst/Al/2A+M6Sx8HScMOG8gN0xshBSjDW2mK LYuPb13YVgLmOHLQCuDudeV1sL1Ixof4Nt2Vg0SJpT2mkOzw8NOeSGuz4LVnKH9uPUtN DvuXi4QXBxfcE0tp7+/vp/V0A4sm+nMazO15YA0TvnjFeJWvZWcNXhb6xy8knSHdxoEt a6j4SOAQoC2QIAcIpn+WREZCXbYmoWC/qIm+kYzptU53ju9Tm7E85MYzJRtFSOSE264J p9x0Oexo3A70p8LlMo74OaR/J5QeJyChguKDR6thPOkgLIzub3c9zbfCNt5R8YdP4cfI DkBA== X-Gm-Message-State: ALoCoQlEsKpJa2XFiUHu+qoOqlPlA7wXcSXfyBjrKKZ0RJHfFcEjoStXk44i4nwLJ5OMgENP8IK7 X-Received: by 10.236.228.40 with SMTP id e38mr9853905yhq.76.1405088614773; Fri, 11 Jul 2014 07:23:34 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.113]) by mx.google.com with ESMTPSA id f63sm5309293yhf.1.2014.07.11.07.23.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Jul 2014 07:23:34 -0700 (PDT) From: Ezequiel Garcia To: , , Dave Airlie Subject: [PATCH 8/8] drm/tilcdc: panel: Add support for enable GPIO Date: Fri, 11 Jul 2014 11:18:54 -0300 Message-Id: <1405088334-11215-9-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1405088334-11215-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1405088334-11215-1-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailman-Approved-At: Fri, 11 Jul 2014 08:35:47 -0700 Cc: daniel.vetter@ffwll.ch, Russell King , Ezequiel Garcia X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 In order to support the "enable GPIO" available in many panel devices, this commit adds a proper devicetree binding. By providing an enable GPIO in the devicetree, the driver can now turn off and on the panel device, and/or the backlight device. Both the backlight and the GPIO are optional properties. Signed-off-by: Ezequiel Garcia --- .../devicetree/bindings/drm/tilcdc/panel.txt | 2 ++ drivers/gpu/drm/tilcdc/tilcdc_panel.c | 37 +++++++++++++++++++--- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt b/Documentation/devicetree/bindings/drm/tilcdc/panel.txt index 10a06e8..4ab9e23 100644 --- a/Documentation/devicetree/bindings/drm/tilcdc/panel.txt +++ b/Documentation/devicetree/bindings/drm/tilcdc/panel.txt @@ -20,6 +20,7 @@ Required properties: Optional properties: - backlight: phandle of the backlight device attached to the panel +- enable-gpios: GPIO pin to enable or disable the panel Recommended properties: - pinctrl-names, pinctrl-0: the pincontrol settings to configure @@ -33,6 +34,7 @@ Example: pinctrl-names = "default"; pinctrl-0 = <&bone_lcd3_cape_lcd_pins>; backlight = <&backlight>; + enable-gpios = <&gpio3 19 0>; panel-info { ac-bias = <255>; diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index f2a5b23..7a03158 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -18,6 +18,7 @@ #include #include #include +#include #include