summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana-panel.c
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-03-12 16:06:34 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2014-03-12 16:06:34 +0100
commitd25f27034e1e3ca1f86c3e748ce0f565f13bff7f (patch)
tree9914ad9ce84d779ee83326d109ebed034523ea5e /arch/arm/mach-tegra/board-ventana-panel.c
parent56db5e2dc402ec8dd7ba922ec5ae1b450ed95d43 (diff)
parent82685ba23c803d10f678f25e92ca62aa575d24d9 (diff)
Merge branch 'l4t/l4t-r16-r2' into colibri
Conflicts: drivers/media/video/tegra_v4l2_camera.c reverted to current driver supporting ACM rather than CSI2 drivers/media/video/videobuf2-dma-nvmap.c drivers/video/tegra/host/Makefile
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana-panel.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c
index d2d89392e1c5..d507dea88813 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-ventana-panel.c
*
- * Copyright (c) 2010-2012 NVIDIA Corporation.
+ * Copyright (c) 2010-2013 NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,6 +48,7 @@
#define ventana_lvds_to_bl_ms 200
static struct regulator *pnl_pwr;
+static struct regulator *vdd_ldo4;
#ifdef CONFIG_TEGRA_DC
static struct regulator *ventana_hdmi_reg = NULL;
@@ -104,11 +105,17 @@ static struct platform_device ventana_backlight_device = {
#ifdef CONFIG_TEGRA_DC
static int ventana_panel_enable(void)
{
- struct regulator *reg = regulator_get(NULL, "vdd_ldo4");
-
- if (!reg) {
- regulator_enable(reg);
- regulator_put(reg);
+ if (vdd_ldo4 == NULL) {
+ vdd_ldo4 = regulator_get(NULL, "vdd_ldo4");
+
+ if (IS_ERR(vdd_ldo4)) {
+ pr_err("%s: couldn't get regulator vdd_ldo4: %ld\n",
+ __func__, PTR_ERR(vdd_ldo4));
+ } else {
+ regulator_enable(vdd_ldo4);
+ regulator_disable(vdd_ldo4);
+ regulator_put(vdd_ldo4);
+ }
}
if (pnl_pwr == NULL) {