From patchwork Thu Feb 26 03:39:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: huang lin X-Patchwork-Id: 5887241 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE0D1BF440 for ; Thu, 26 Feb 2015 03:55:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C63962037A for ; Thu, 26 Feb 2015 03:55:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF45620374 for ; Thu, 26 Feb 2015 03:55:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753212AbbBZDzK (ORCPT ); Wed, 25 Feb 2015 22:55:10 -0500 Received: from lucky1.263xmail.com ([211.157.147.130]:37360 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753190AbbBZDzJ (ORCPT ); Wed, 25 Feb 2015 22:55:09 -0500 X-Greylist: delayed 935 seconds by postgrey-1.27 at vger.kernel.org; Wed, 25 Feb 2015 22:55:08 EST Received: from hl?rock-chips.com (unknown [192.168.167.140]) by lucky1.263xmail.com (Postfix) with SMTP id 5D9931AF05B; Thu, 26 Feb 2015 11:39:24 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 85F16470; Thu, 26 Feb 2015 11:39:21 +0800 (CST) X-RL-SENDER: hl@rock-chips.com X-FST-TO: djkurtz@chromium.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: hl@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: hl@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 8207EG1KM; Thu, 26 Feb 2015 11:39:22 +0800 (CST) From: huang lin To: djkurtz@chromium.org Cc: thierry.reding@gmail.com, jg1.han@samsung.com, lee.jones@linaro.org, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-rockchip@lists.infradead.org, huang lin Subject: [PATCH 2/2] backlight: pwm: Add backlight-boot-off property Date: Thu, 26 Feb 2015 11:39:14 +0800 Message-Id: <1424921954-8621-1-git-send-email-hl@rock-chips.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424920366-7626-1-git-send-email-hl@rock-chips.com> References: <1424920366-7626-1-git-send-email-hl@rock-chips.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=-5.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY, URIBL_BLACK autolearn=ham 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 Add backlight-boot-off property, so we can keeping the backlight disabled at boot until it is enabled implicitly by a panel driver, or explicitly by userspace Signed-off-by: huang lin --- drivers/video/backlight/pwm_bl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 3a145a6..dece351 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -319,6 +319,10 @@ static int pwm_backlight_probe(struct platform_device *pdev) } bl->props.brightness = data->dft_brightness; + + if (of_find_property(pdev->dev.of_node, "backlight-boot-off", NULL)) + bl->props.power = FB_BLANK_POWERDOWN; + backlight_update_status(bl); platform_set_drvdata(pdev, bl);