From patchwork Wed May 4 09:43:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 618335 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3r0Cp15Qqmz9t5w for ; Wed, 4 May 2016 19:45:29 +1000 (AEST) 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 1axtLj-00079U-9s; Wed, 04 May 2016 09:44:07 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1axtLb-0006wc-95 for linux-arm-kernel@lists.infradead.org; Wed, 04 May 2016 09:44:00 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1axtKz-0004J9-7x; Wed, 04 May 2016 11:43:21 +0200 Received: from ukl by dude.hi.pengutronix.de with local (Exim 4.87) (envelope-from ) id 1axtKy-0001xR-I9; Wed, 04 May 2016 11:43:20 +0200 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Subject: [PATCH v2 2/3] video: fbdev: imxfb: enable lcd regulator in .probe Date: Wed, 4 May 2016 11:43:17 +0200 Message-Id: <1462354998-5792-3-git-send-email-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1462354998-5792-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1462354998-5792-1-git-send-email-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160504_024359_576130_087C85AF X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -2.9 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org This asserts that the display is on after the driver is initialized. Otherwise, depending on how the boot loader handled the display, it is either disabled as the regulator doesn't seem in use, or it stays off. Signed-off-by: Uwe Kleine-König --- No changes since (implicit) v1, sent with Message-Id: 1457380425-20244-3-git-send-email-u.kleine-koenig@pengutronix.de drivers/video/fbdev/imxfb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 6d402c1a0f2b..18388ca178a2 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -995,8 +995,17 @@ static int imxfb_probe(struct platform_device *pdev) imxfb_enable_controller(fbi); fbi->pdev = pdev; + if (!IS_ERR(fbi->lcd_pwr)) { + ret = regulator_enable(fbi->lcd_pwr); + if (ret) + goto failed_regulator; + } + return 0; +failed_regulator: + imxfb_disable_controller(fbi); + failed_lcd: unregister_framebuffer(info);