public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Cvek <petr.cvek@tul.cz>
To: robert.jarzmik@free.fr, philipp.zabel@gmail.com,
	daniel@zonque.org, haojian.zhuang@gmail.com, cooloney@gmail.com,
	rpurdie@rpsys.net, j.anaszewski@samsung.com,
	linux@arm.linux.org.uk, sre@kernel.org, dbaryshkov@gmail.com,
	lee.jones@linaro.org, sameo@linux.intel.com, dwmw2@infradead.org,
	arnd@arndb.de, g.liakhovetski@gmx.de
Cc: linux-leds@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 08/26] ARM: pxa: magician: Rename abstract LCD GPIOs
Date: Thu, 17 Sep 2015 06:57:11 +0200	[thread overview]
Message-ID: <55FA4827.7030307@tul.cz> (raw)
In-Reply-To: <cover.1442462898.git.petr.cvek@tul.cz>

This patch renames GPIOs, which are used to control the power lines to
the LCD screen. New names correspond to a real functionality, which was
measured on the HTC Magician board_id 0x3a.

Signed-off-by: Petr Cvek <petr.cvek@tul.cz>
---
 arch/arm/mach-pxa/include/mach/magician.h |  6 +++---
 arch/arm/mach-pxa/magician.c              | 33 +++++++++++++++++--------------
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/arch/arm/mach-pxa/include/mach/magician.h b/arch/arm/mach-pxa/include/mach/magician.h
index 88da10e..f0e08f8 100644
--- a/arch/arm/mach-pxa/include/mach/magician.h
+++ b/arch/arm/mach-pxa/include/mach/magician.h
@@ -52,9 +52,9 @@
 #define GPIO101_MAGICIAN_KEY_VOL_DOWN 		101
 #define GPIO102_MAGICIAN_KEY_PHONE		102
 #define GPIO103_MAGICIAN_LED_KP		103
-#define GPIO104_MAGICIAN_LCD_POWER_1 		104
-#define GPIO105_MAGICIAN_LCD_POWER_2		105
-#define GPIO106_MAGICIAN_LCD_POWER_3		106
+#define GPIO104_MAGICIAN_LCD_VOFF_EN		104
+#define GPIO105_MAGICIAN_LCD_VON_EN		105
+#define GPIO106_MAGICIAN_LCD_DCDC_NRESET	106
 #define GPIO107_MAGICIAN_DS1WM_IRQ		107
 #define GPIO108_MAGICIAN_GSM_READY		108
 #define GPIO114_MAGICIAN_UNKNOWN		114
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 91d302b..d78fc3a 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -337,22 +337,22 @@ static void toppoly_lcd_power(int on, struct fb_var_screeninfo *si)
 
 	if (on) {
 		gpio_set_value(EGPIO_MAGICIAN_TOPPOLY_POWER, 1);
-		gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 1);
+		gpio_set_value(GPIO106_MAGICIAN_LCD_DCDC_NRESET, 1);
 		udelay(2000);
 		gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 1);
 		udelay(2000);
 		/* FIXME: enable LCDC here */
 		udelay(2000);
-		gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 1);
+		gpio_set_value(GPIO104_MAGICIAN_LCD_VOFF_EN, 1);
 		udelay(2000);
-		gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 1);
+		gpio_set_value(GPIO105_MAGICIAN_LCD_VON_EN, 1);
 	} else {
 		msleep(15);
-		gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 0);
+		gpio_set_value(GPIO105_MAGICIAN_LCD_VON_EN, 0);
 		udelay(500);
-		gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 0);
+		gpio_set_value(GPIO104_MAGICIAN_LCD_VOFF_EN, 0);
 		udelay(1000);
-		gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 0);
+		gpio_set_value(GPIO106_MAGICIAN_LCD_DCDC_NRESET, 0);
 		gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 0);
 	}
 }
@@ -367,19 +367,19 @@ static void samsung_lcd_power(int on, struct fb_var_screeninfo *si)
 		else
 			gpio_set_value(EGPIO_MAGICIAN_LCD_POWER, 1);
 		mdelay(10);
-		gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 1);
+		gpio_set_value(GPIO106_MAGICIAN_LCD_DCDC_NRESET, 1);
 		mdelay(10);
-		gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 1);
+		gpio_set_value(GPIO104_MAGICIAN_LCD_VOFF_EN, 1);
 		mdelay(30);
-		gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 1);
+		gpio_set_value(GPIO105_MAGICIAN_LCD_VON_EN, 1);
 		mdelay(10);
 	} else {
 		mdelay(10);
-		gpio_set_value(GPIO105_MAGICIAN_LCD_POWER_2, 0);
+		gpio_set_value(GPIO105_MAGICIAN_LCD_VON_EN, 0);
 		mdelay(30);
-		gpio_set_value(GPIO104_MAGICIAN_LCD_POWER_1, 0);
+		gpio_set_value(GPIO104_MAGICIAN_LCD_VOFF_EN, 0);
 		mdelay(10);
-		gpio_set_value(GPIO106_MAGICIAN_LCD_POWER_3, 0);
+		gpio_set_value(GPIO106_MAGICIAN_LCD_DCDC_NRESET, 0);
 		mdelay(10);
 		if (system_rev < 3)
 			gpio_set_value(GPIO75_MAGICIAN_SAMSUNG_POWER, 0);
@@ -796,9 +796,11 @@ static struct platform_device *devices[] __initdata = {
 static struct gpio magician_global_gpios[] = {
 	{ GPIO13_MAGICIAN_CPLD_IRQ, GPIOF_IN, "CPLD_IRQ" },
 	{ GPIO107_MAGICIAN_DS1WM_IRQ, GPIOF_IN, "DS1WM_IRQ" },
-	{ GPIO104_MAGICIAN_LCD_POWER_1, GPIOF_OUT_INIT_LOW, "LCD power 1" },
-	{ GPIO105_MAGICIAN_LCD_POWER_2, GPIOF_OUT_INIT_LOW, "LCD power 2" },
-	{ GPIO106_MAGICIAN_LCD_POWER_3, GPIOF_OUT_INIT_LOW, "LCD power 3" },
+
+	/* NOTICE valid LCD init sequence */
+	{ GPIO106_MAGICIAN_LCD_DCDC_NRESET, GPIOF_OUT_INIT_LOW, "LCD DCDC nreset" },
+	{ GPIO104_MAGICIAN_LCD_VOFF_EN, GPIOF_OUT_INIT_LOW, "LCD VOFF enable" },
+	{ GPIO105_MAGICIAN_LCD_VON_EN, GPIOF_OUT_INIT_LOW, "LCD VON enable" },
 	{ GPIO83_MAGICIAN_nIR_EN, GPIOF_OUT_INIT_HIGH, "nIR_EN" },
 };
 
@@ -835,6 +837,7 @@ static void __init magician_init(void)
 		lcd_select = board_id & 0x8;
 		pr_info("LCD type: %s\n", lcd_select ? "Samsung" : "Toppoly");
 		if (lcd_select && (system_rev < 3))
+			/* NOTICE valid LCD init sequence */
 			gpio_request_one(GPIO75_MAGICIAN_SAMSUNG_POWER,
 				GPIOF_OUT_INIT_LOW, "Samsung LCD Power");
 		pxa_set_fb_info(NULL,
-- 
1.7.12.1

  parent reply	other threads:[~2015-09-17  4:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1442462898.git.petr.cvek@tul.cz>
2015-09-17  4:54 ` [PATCH v3 01/26] ARM: pxa: magician: Fix indentation in machine files Petr Cvek
2015-09-17  4:55 ` [PATCH v3 02/26] ARM: pxa: magician: Change comments to be more informative Petr Cvek
2015-09-17  4:55 ` [PATCH v3 03/26] ARM: pxa: magician: Print more specific error message for global GPIOs Petr Cvek
2015-09-17  4:55 ` [PATCH v3 04/26] ARM: pxa: magician: Optimize debug messages for LCD power Petr Cvek
2015-09-26 11:55   ` Robert Jarzmik
2015-09-17  4:55 ` [PATCH v3 05/26] ARM: pxa: magician: Change description of LCD power GPIO Petr Cvek
2015-09-26 11:55   ` Robert Jarzmik
2015-09-17  4:56 ` [PATCH v3 06/26] ARM: pxa: magician: Add new discovered EGPIO pins Petr Cvek
2015-09-17  4:56 ` [PATCH v3 07/26] ARM: pxa: magician: Fix HTC Magician pin mux definitions Petr Cvek
2015-09-17  4:57 ` Petr Cvek [this message]
2015-09-17  4:57 ` [PATCH v3 09/26] ARM: pxa: magician: Optimize powerup delays for Samsung LCD Petr Cvek
2015-09-17  4:57 ` [PATCH v3 10/26] ARM: pxa: magician: Optimize Samsung LCD refresh to 50Hz Petr Cvek
2015-09-17  4:58 ` [PATCH v3 11/26] ARM: pxa: magician: Optimize EGPIO initial values Petr Cvek
2015-09-17  4:58 ` [PATCH v3 12/26] ARM: pxa: magician: Rename charger cable detection EGPIOs Petr Cvek
2015-09-17  4:59 ` [PATCH v3 13/26] ARM: pxa: magician: Fix and add charging detection functions Petr Cvek
2015-09-26 14:45   ` Robert Jarzmik
2015-09-17  4:59 ` [PATCH v3 14/26] ARM: pxa: magician: Fix platform data for both PXA27x I2C controllers Petr Cvek
2015-09-17  4:59 ` [PATCH v3 15/26] ARM: pxa: magician: Fix redundant GPIO request for pxaficp_ir Petr Cvek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55FA4827.7030307@tul.cz \
    --to=petr.cvek@tul.cz \
    --cc=arnd@arndb.de \
    --cc=cooloney@gmail.com \
    --cc=daniel@zonque.org \
    --cc=dbaryshkov@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=haojian.zhuang@gmail.com \
    --cc=j.anaszewski@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=philipp.zabel@gmail.com \
    --cc=robert.jarzmik@free.fr \
    --cc=rpurdie@rpsys.net \
    --cc=sameo@linux.intel.com \
    --cc=sre@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox