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: 369182 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 674CC1400BE for ; Sat, 12 Jul 2014 00:23:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755004AbaGKOXg (ORCPT ); Fri, 11 Jul 2014 10:23:36 -0400 Received: from mail-yh0-f54.google.com ([209.85.213.54]:53288 "EHLO mail-yh0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754999AbaGKOXf (ORCPT ); Fri, 11 Jul 2014 10:23:35 -0400 Received: by mail-yh0-f54.google.com with SMTP id i57so434144yha.13 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=ImU/Z1lvDyYOMM5Vd7GjYGBqSGOm8GYNxR+UbV0gZOt0Xf7IlbQmX/lVWq6HribvKk RvwD5DuLiAqJEKZa+b7dVb/AXAEmpuB+y1HpZk8+TbusxUlI7j/rl0/y7qwGuuSxaZKt M2q0H2Xf3brJGeqDaHp3kBXqyB1eAwwjiHMduCJ0oBqU33cPPrh5LRPNcHlkEEyVpn2h wQvGg7TPACn+Kgf0jMdhMO9G3A+CVvROVqIVEG+cZRJad4u3j7f0iLfwGcx99WAjmoSc SYUQErGFVKujgIclrU11hUCZa4fSNfKeXTdPsm5ayH/WSHoIn9poA8Ph9UXo4FiJCL8E 8bug== X-Gm-Message-State: ALoCoQn8sJofs0TXvCTe5FZee/0FCCo9T+e6VF4yjkn5dWKTP2OZwoemcM0OoIqSzr50gTAQTgW9 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 Cc: Russell King , Darren Etheridge , daniel.vetter@ffwll.ch, =?UTF-8?q?Guido=20Mart=C3=ADnez?= , Ezequiel Garcia 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> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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