From patchwork Tue Sep 2 12:51:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 4825081 Return-Path: X-Original-To: patchwork-dri-devel@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 04F069F2ED for ; Tue, 2 Sep 2014 12:54:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D12DD20170 for ; Tue, 2 Sep 2014 12:54:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A3F57201BC for ; Tue, 2 Sep 2014 12:54:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CA2426E475; Tue, 2 Sep 2014 05:54:29 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-vc0-f170.google.com (mail-vc0-f170.google.com [209.85.220.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 3E7A26E473 for ; Tue, 2 Sep 2014 05:54:29 -0700 (PDT) Received: by mail-vc0-f170.google.com with SMTP id la4so6879718vcb.15 for ; Tue, 02 Sep 2014 05:54:28 -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=bj3xQdGb3RnBrGBg/M0TpQECGq0w3fPfpk9HnvdGOyE=; b=ED2lh63NpKhENjaD2aoOaXQMpOYZTWrJwredI5uA3zn1jR1pY85XQf/Ft6kFPWMIte L/jTcm2KxK+l572uWMnFyQKILBgDjEI5djsfQm6TRB8iq6AMmaHmI0n/sElguPiTuKWl GUEiC1bpMuvU2JgLse1rpVOvTvnutTCdMDxtL2QofAnMqsQohG+tePLgqOC+cfQWXtGB k7AN2fzucbOTCLn50F1SVKtEqTlQjfLisOqZ/4nGKpTnOdY1zUgpQ8yOukDOS/nPAeZj qnbgH3FIrUrjxPjkRSVPTvqcgzX/sQ55qdmf4JqUrZUreaaGeWyqv6vAKZpghK8WQdTT H6vQ== X-Gm-Message-State: ALoCoQnBj8VJrBmnnj0Q2G30iOkuwakkwP3FIE0bkUWm82jY2WQPNV+UVMUarHtqOJfslC88ho1d X-Received: by 10.52.94.108 with SMTP id db12mr25054819vdb.8.1409662468866; Tue, 02 Sep 2014 05:54:28 -0700 (PDT) Received: from arch.hh.imgtec.org ([190.2.108.102]) by mx.google.com with ESMTPSA id vm20sm9912017vdb.21.2014.09.02.05.54.26 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Sep 2014 05:54:28 -0700 (PDT) From: Ezequiel Garcia To: , Dave Airlie Subject: [PATCH/RESEND 8/8] drm/tilcdc: panel: Add support for enable GPIO Date: Tue, 2 Sep 2014 09:51:22 -0300 Message-Id: <1409662282-7945-9-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1409662282-7945-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1409662282-7945-1-git-send-email-ezequiel@vanguardiasur.com.ar> 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=-5.9 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. Tested-by: Darren Etheridge 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