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: 9653961 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B436D60113 for ; Thu, 30 Mar 2017 11:17:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA19D284EF for ; Thu, 30 Mar 2017 11:17:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9EDF828544; Thu, 30 Mar 2017 11:17:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3687C284EF for ; Thu, 30 Mar 2017 11:17:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 37D126E8B5; Thu, 30 Mar 2017 11:16:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D58C6E882 for ; Thu, 30 Mar 2017 11:16:46 +0000 (UTC) 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 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 Cc: Peter Ujfalusi , devicetree@vger.kernel.org, Tomi Valkeinen , Jyri Sarha X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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