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: 5887211 Return-Path: X-Original-To: patchwork-linux-rockchip@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 C0AB1BF440 for ; Thu, 26 Feb 2015 03:40:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 00B9B20382 for ; Thu, 26 Feb 2015 03:40:27 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 25CCA20374 for ; Thu, 26 Feb 2015 03:40:26 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQpJD-0003fd-73; Thu, 26 Feb 2015 03:40:19 +0000 Received: from lucky1.263xmail.com ([211.157.147.130]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YQpJA-0002FI-N1 for linux-rockchip@lists.infradead.org; Thu, 26 Feb 2015 03:40:17 +0000 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150225_194016_960030_D0AE0E2B X-CRM114-Status: UNSURE ( 4.42 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.7 (+) Cc: linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, huang lin , jg1.han@samsung.com, linux-rockchip@lists.infradead.org, thierry.reding@gmail.com, lee.jones@linaro.org X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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);