From patchwork Thu Mar 30 11:15:25 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 745191 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 3vv2CB1Kx3z9s2Q for ; Thu, 30 Mar 2017 22:16:54 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="xDPk9m65"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933010AbdC3LQx (ORCPT ); Thu, 30 Mar 2017 07:16:53 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:12617 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932944AbdC3LQw (ORCPT ); Thu, 30 Mar 2017 07:16:52 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2UBGIaN031355; Thu, 30 Mar 2017 06:16:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1490872578; bh=lGX2/Yg8t3Dd0yQahZSryUx3KWZ/jr0ql/u4bMVvi18=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xDPk9m654v3sHm/x9SU4acAcCIXluGzw6aV6OHQcwV4FZ8h8Brork2dK2fDvBjAyp 4I/NFP9rm4tYfsfDxWZrFCg80VdQ1LrnLvorq/IGcNPLA0wZQWTkVI3WFyhCfZTZYN uwJg/fEEN1cu+aB9+wiYgR7HPEd7t4Nj+8UhfVYg= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2UBGDBA002052; Thu, 30 Mar 2017 06:16:13 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 30 Mar 2017 06:16:12 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2UBFV8J016391; Thu, 30 Mar 2017 06:16:11 -0500 From: Tomi Valkeinen To: , Laurent Pinchart CC: Jyri Sarha , Peter Ujfalusi , Tomi Valkeinen , Subject: [PATCHv4 25/29] drm/omap: displays: panel-dpi: Support for handling backlight devices Date: Thu, 30 Mar 2017 14:15:25 +0300 Message-ID: <1490872529-23084-26-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490872529-23084-1-git-send-email-tomi.valkeinen@ti.com> References: <1490872529-23084-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Peter Ujfalusi The associated backlight device can be configured via DT by providing the phandle to the device. If the backlight device is configured, the driver can manage the backligt along with the panel's power state, iow it can turn on the backlight when the panel is enabled and turn it off when the panel is disabled. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen Cc: devicetree@vger.kernel.org --- .../bindings/display/panel/panel-dpi.txt | 3 ++ drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 37 ++++++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt index d4add13e592d..6b203bc4d932 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.txt +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.txt @@ -9,6 +9,7 @@ Optional properties: - enable-gpios: panel enable gpio - reset-gpios: GPIO to control the RESET pin - vcc-supply: phandle of regulator that will be used to enable power to the display +- backlight: phandle of the backlight device Required nodes: - "panel-timing" containing video timings @@ -22,6 +23,8 @@ lcd0: display@0 { compatible = "samsung,lte430wq-f0c", "panel-dpi"; label = "lcd"; + backlight = <&backlight>; + port { lcd_in: endpoint { remote-endpoint = <&dpi_out>; diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c index 38003208d9ca..04ce8c5f2954 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dpi.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dpi.c @@ -16,6 +16,7 @@ #include #include #include +#include #include