From patchwork Tue Apr 29 15:28:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 4088141 Return-Path: X-Original-To: patchwork-linux-fbdev@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 D19C9BFF02 for ; Tue, 29 Apr 2014 15:31:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 06FDF20160 for ; Tue, 29 Apr 2014 15:31:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2C02D201E7 for ; Tue, 29 Apr 2014 15:31:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757097AbaD2Paf (ORCPT ); Tue, 29 Apr 2014 11:30:35 -0400 Received: from mail-ee0-f42.google.com ([74.125.83.42]:46359 "EHLO mail-ee0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756419AbaD2Pae (ORCPT ); Tue, 29 Apr 2014 11:30:34 -0400 Received: by mail-ee0-f42.google.com with SMTP id d17so470463eek.1 for ; Tue, 29 Apr 2014 08:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=r9KL6g4tyMbVrbNdt8HcRWvL2+nvMKWvt4mJ2f8Cim8=; b=eLmqH+Xjdv2ZrUdlbkOdpKiGcBFk4XN5loUGUUy7h44ZKX/f0/vBz5ElstXBTxIfJe ZBtdG1yKZYYisUQFEwz1tFB38qzDw8FpSbEdHGV74meyPHTeiBnCmvrdrqsilY7whDMK KjeWGOVmFCqYLyfdFqWkQSBhMX0fZW6GDq/gSws6D6wLcgck9uPr4+aXaRIGNTw7g3+K BXq8l+uttS6Kysf5uhyq3GANXb7rX95gM5/rNqRdWUAkcmARpXaY6miPh/JVBiQt7OC0 I0SSR+sqFIMlkPVb0NLFn0P6shzeNH0Pk1kN5V8MlSBo4xuaucJtwDIhqlg5RO2lMz0w /9fQ== X-Received: by 10.15.107.75 with SMTP id ca51mr2588109eeb.103.1398785433076; Tue, 29 Apr 2014 08:30:33 -0700 (PDT) Received: from localhost (port-22200.pppoe.wtnet.de. [46.59.148.101]) by mx.google.com with ESMTPSA id y51sm60067635eeu.0.2014.04.29.08.30.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Apr 2014 08:30:32 -0700 (PDT) From: Thierry Reding To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Cc: Stephen Warren Subject: [PATCH 2/3] drm/panel: simple - Disable panel on shutdown Date: Tue, 29 Apr 2014 17:28:58 +0200 Message-Id: <1398785339-8107-2-git-send-email-thierry.reding@gmail.com> X-Mailer: git-send-email 1.9.2 In-Reply-To: <1398785339-8107-1-git-send-email-thierry.reding@gmail.com> References: <1398785339-8107-1-git-send-email-thierry.reding@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Thierry Reding When a device is shut down, disable the panel to make sure the display backlight doesn't stay lit. Signed-off-by: Thierry Reding --- drivers/gpu/drm/panel/panel-simple.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 309f29e9234a..a790f4c337cf 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -262,6 +262,13 @@ static int panel_simple_remove(struct device *dev) return 0; } +static void panel_simple_shutdown(struct device *dev) +{ + struct panel_simple *panel = dev_get_drvdata(dev); + + panel_simple_disable(&panel->base); +} + static const struct drm_display_mode auo_b101aw03_mode = { .clock = 51450, .hdisplay = 1024, @@ -412,6 +419,11 @@ static int panel_simple_platform_remove(struct platform_device *pdev) return panel_simple_remove(&pdev->dev); } +static void panel_simple_platform_shutdown(struct platform_device *pdev) +{ + panel_simple_shutdown(&pdev->dev); +} + static struct platform_driver panel_simple_platform_driver = { .driver = { .name = "panel-simple", @@ -420,6 +432,7 @@ static struct platform_driver panel_simple_platform_driver = { }, .probe = panel_simple_platform_probe, .remove = panel_simple_platform_remove, + .shutdown = panel_simple_platform_shutdown, }; struct panel_desc_dsi { @@ -561,6 +574,11 @@ static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi) return panel_simple_remove(&dsi->dev); } +static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi) +{ + panel_simple_shutdown(&dsi->dev); +} + static struct mipi_dsi_driver panel_simple_dsi_driver = { .driver = { .name = "panel-simple-dsi", @@ -569,6 +587,7 @@ static struct mipi_dsi_driver panel_simple_dsi_driver = { }, .probe = panel_simple_dsi_probe, .remove = panel_simple_dsi_remove, + .shutdown = panel_simple_dsi_shutdown, }; static int __init panel_simple_init(void)