linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: pxa: palmtreo: a few treo fixes
@ 2012-12-22 19:31 Mike Dunn
  2012-12-22 19:31 ` [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680 Mike Dunn
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Mike Dunn @ 2012-12-22 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

Some miscellaneous fixes to the treo code.

Mike Dunn (3):
  ARM: pxa: palmtreo: fix lcd initialization on treo680
  ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device
  ARM: pxa: palmtreo: add docg4 device initialization

 arch/arm/mach-pxa/include/mach/palmtreo.h |    3 +
 arch/arm/mach-pxa/palmtreo.c              |  102 ++++++++++++++++++++++++++---
 2 files changed, 96 insertions(+), 9 deletions(-)

-- 
1.7.8.6

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680
  2012-12-22 19:31 [PATCH 0/3] ARM: pxa: palmtreo: a few treo fixes Mike Dunn
@ 2012-12-22 19:31 ` Mike Dunn
  2012-12-23  3:18   ` Marek Vasut
  2012-12-22 19:31 ` [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device Mike Dunn
  2012-12-22 19:31 ` [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization Mike Dunn
  2 siblings, 1 reply; 11+ messages in thread
From: Mike Dunn @ 2012-12-22 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

This patch gets the LCD working on my Palm Treo680.  Changing the Palm Centro
code is avoided (I don't have a Centro for testing at the moment), but some
initialization is shuffled around a bit.

This basically adds some code that manages the three gpios that interface to the
lcd on the Treo 680.  The precise role of each gpio in the hardware architecture
is not entirely clear to me; this patch is the result of trial-and-error and
observing how the PalmOS code initializes the lcd.

The need for this patch is not evident when Linux is loaded from PalmOS, because
at that point the lcd-related gpios have already been configured.  But when
booting the kernel by other means, this patch is required unless the bootloader
has performed the necessary initialializations.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
---

I suspect that at least some of these changes may apply to the Centro as well.
When I get a hold of one, I will sort this all out.

 arch/arm/mach-pxa/include/mach/palmtreo.h |    3 +
 arch/arm/mach-pxa/palmtreo.c              |   59 +++++++++++++++++++++++++++--
 2 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-pxa/include/mach/palmtreo.h b/arch/arm/mach-pxa/include/mach/palmtreo.h
index 2d3f14e..3266194 100644
--- a/arch/arm/mach-pxa/include/mach/palmtreo.h
+++ b/arch/arm/mach-pxa/include/mach/palmtreo.h
@@ -44,6 +44,9 @@
 #define GPIO_NR_TREO680_VIBRATE_EN	44
 #define GPIO_NR_TREO680_KEYB_BL		24
 #define GPIO_NR_TREO680_BT_EN		43
+#define GPIO_NR_TREO680_LCD_POWER	77
+#define GPIO_NR_TREO680_LCD_EN		86
+#define GPIO_NR_TREO680_LCD_EN_N	25
 #endif /* CONFIG_MACH_TREO680 */
 
 /* Centro685 specific GPIOs */
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index 3f3c48f..dcc38a1 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -98,9 +98,6 @@ static unsigned long treo_pin_config[] __initdata = {
 	GPIO96_KP_MKOUT_6,
 	GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,	/* Hotsync button */
 
-	/* LCD */
-	GPIOxx_LCD_TFT_16BPP,
-
 	/* Quick Capture Interface */
 	GPIO84_CIF_FV,
 	GPIO85_CIF_LV,
@@ -140,6 +137,12 @@ static unsigned long treo680_pin_config[] __initdata = {
 	/* MATRIX KEYPAD - different wake up source */
 	GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
 	GPIO99_KP_MKIN_5,
+
+	/* LCD... L_BIAS alt fn not configured on Treo680; is GPIO instead */
+	GPIOxx_LCD_16BPP,
+	GPIO74_LCD_FCLK,
+	GPIO75_LCD_LCLK,
+	GPIO76_LCD_PCLK,
 };
 #endif /* CONFIG_MACH_TREO680 */
 
@@ -155,6 +158,9 @@ static unsigned long centro685_pin_config[] __initdata = {
 	/* MATRIX KEYPAD - different wake up source */
 	GPIO100_KP_MKIN_0,
 	GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
+
+	/* LCD */
+	GPIOxx_LCD_TFT_16BPP,
 };
 #endif /* CONFIG_MACH_CENTRO */
 
@@ -411,7 +417,6 @@ static void __init palmphone_common_init(void)
 	pxa_set_btuart_info(NULL);
 	pxa_set_stuart_info(NULL);
 	palm27x_pm_init(TREO_STR_BASE);
-	palm27x_lcd_init(GPIO_NR_TREO_BL_POWER, &palm_320x320_new_lcd_mode);
 	palm27x_udc_init(GPIO_NR_TREO_USB_DETECT, GPIO_NR_TREO_USB_PULLUP, 1);
 	palm27x_irda_init(GPIO_NR_TREO_IR_EN);
 	palm27x_ac97_init(-1, -1, -1, 95);
@@ -424,10 +429,55 @@ static void __init palmphone_common_init(void)
 }
 
 #ifdef CONFIG_MACH_TREO680
+void __init treo680_lcd_init(void)
+{
+	unsigned int gpio;
+
+	/* drive all three gpios high initially */
+	const unsigned long flags = GPIOF_INIT_HIGH | GPIOF_DIR_OUT;
+
+	/*
+	 * This is likely the power to the lcd.  Toggling it low/high appears to
+	 * turn the lcd off/on.  Can be toggled after lcd is initialized without
+	 * any apparent adverse effects to the lcd operation.  Note that this
+	 * gpio line is used by the lcd controller as the L_BIAS signal, but
+	 * treo680 configures it as gpio.
+	 */
+	gpio = GPIO_NR_TREO680_LCD_POWER;
+	if (gpio_request_one(gpio, flags, "LCD power") < 0)
+		goto fail;
+
+	/*
+	 * These two are called enables, for lack of a better understanding.  If
+	 * either of these are toggled after the lcd is initialized, the image
+	 * becomes degraded.
+	 */
+	gpio = GPIO_NR_TREO680_LCD_EN;
+	if (gpio_request_one(gpio, flags, "LCD enable") < 0)
+		goto fail;
+	gpio = GPIO_NR_TREO680_LCD_EN_N;
+	if (gpio_request_one(gpio, flags, "LCD enable_n") < 0)
+		goto fail;
+
+	/* common lcd initialization */
+	palm27x_lcd_init(GPIO_NR_TREO_BL_POWER, &palm_320x320_new_lcd_mode);
+
+	/* driving this low turns LCD on */
+	gpio_set_value(GPIO_NR_TREO680_LCD_EN_N, 0);
+
+	return;
+ fail:
+	pr_err("gpio %d initialization failed\n", gpio);
+	gpio_free(GPIO_NR_TREO680_LCD_POWER);
+	gpio_free(GPIO_NR_TREO680_LCD_EN);
+	gpio_free(GPIO_NR_TREO680_LCD_EN_N);
+}
+
 static void __init treo680_init(void)
 {
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
 	palmphone_common_init();
+	treo680_lcd_init();
 	palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
 			GPIO_NR_TREO680_SD_POWER, 0);
 }
@@ -438,6 +488,7 @@ static void __init centro_init(void)
 {
 	pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config));
 	palmphone_common_init();
+	palm27x_lcd_init(GPIO_NR_TREO_BL_POWER, &palm_320x320_new_lcd_mode);
 	palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, -1,
 			GPIO_NR_CENTRO_SD_POWER, 1);
 }
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device
  2012-12-22 19:31 [PATCH 0/3] ARM: pxa: palmtreo: a few treo fixes Mike Dunn
  2012-12-22 19:31 ` [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680 Mike Dunn
@ 2012-12-22 19:31 ` Mike Dunn
  2012-12-23  3:20   ` Marek Vasut
  2012-12-22 19:31 ` [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization Mike Dunn
  2 siblings, 1 reply; 11+ messages in thread
From: Mike Dunn @ 2012-12-22 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

The #ifdefs around the leds-gpio device platform data are erroneous.  Currently
the device is not instantiated on the centro unless CONFIG_MACH_TREO680 is
defined.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
---

The #ifdefs within palmtreo_leds_init() are a little ugly, but I think the only
alternative would be to instantiate the leds-gpio device platform data for both
treo680 and centro, which would require some of the #defines in palmtreo.h to be
moved outside their containing #ifdef CONFIG_MACH_{TREO680,CENTRO}.

 arch/arm/mach-pxa/palmtreo.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index dcc38a1..cb9cc7b 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -357,7 +357,9 @@ static struct gpio_led_platform_data treo680_gpio_led_info = {
 	.leds		= treo680_gpio_leds,
 	.num_leds	= ARRAY_SIZE(treo680_gpio_leds),
 };
+#endif
 
+#ifdef CONFIG_MACH_CENTRO
 static struct gpio_led centro_gpio_leds[] = {
 	{
 		.name			= "centro:vibra:vibra",
@@ -381,25 +383,25 @@ static struct gpio_led_platform_data centro_gpio_led_info = {
 	.leds		= centro_gpio_leds,
 	.num_leds	= ARRAY_SIZE(centro_gpio_leds),
 };
+#endif
 
 static struct platform_device palmtreo_leds = {
 	.name   = "leds-gpio",
 	.id     = -1,
-	.dev    = {
-		.platform_data  = &treo680_gpio_led_info,
-	}
 };
 
 static void __init palmtreo_leds_init(void)
 {
+#ifdef CONFIG_MACH_CENTRO
 	if (machine_is_centro())
 		palmtreo_leds.dev.platform_data = &centro_gpio_led_info;
-
+#endif
+#ifdef CONFIG_MACH_TREO680
+	if (machine_is_treo680())
+		palmtreo_leds.dev.platform_data = &treo680_gpio_led_info;
+#endif
 	platform_device_register(&palmtreo_leds);
 }
-#else
-static inline void palmtreo_leds_init(void) {}
-#endif
 
 /******************************************************************************
  * Machine init
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization
  2012-12-22 19:31 [PATCH 0/3] ARM: pxa: palmtreo: a few treo fixes Mike Dunn
  2012-12-22 19:31 ` [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680 Mike Dunn
  2012-12-22 19:31 ` [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device Mike Dunn
@ 2012-12-22 19:31 ` Mike Dunn
  2012-12-23  3:21   ` Marek Vasut
  2012-12-23 14:11   ` Sergei Shtylyov
  2 siblings, 2 replies; 11+ messages in thread
From: Mike Dunn @ 2012-12-22 19:31 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds initialization of the docg4 nand flash device to the treo680.

Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
---
 arch/arm/mach-pxa/palmtreo.c |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
index cb9cc7b..f3e2d08 100644
--- a/arch/arm/mach-pxa/palmtreo.c
+++ b/arch/arm/mach-pxa/palmtreo.c
@@ -404,6 +404,36 @@ static void __init palmtreo_leds_init(void)
 }
 
 /******************************************************************************
+ * diskonchip docg4 flash
+ ******************************************************************************/
+#if defined(CONFIG_MACH_TREO680)
+/* REVISIT: does the centro have this device also? */
+#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE)
+static struct resource docg4_resources[] = {
+	{
+		.start	= 0x00000000,
+		.end	= 0x00001FFF,
+		.flags	= IORESOURCE_MEM,
+	},
+};
+
+static struct platform_device palmtreo680_docg4_flashdevice = {
+	.name   = "docg4",
+	.id     = -1,
+	.resource = docg4_resources,
+	.num_resources = ARRAY_SIZE(docg4_resources),
+};
+
+static void __init palmtreo680_docg4_flash_init(void)
+{
+	platform_device_register(&palmtreo680_docg4_flashdevice);
+}
+#else
+static inline void palmtreo680_docg4_flash_init(void) {}
+#endif
+#endif
+
+/******************************************************************************
  * Machine init
  ******************************************************************************/
 static void __init treo_reserve(void)
@@ -482,6 +512,7 @@ static void __init treo680_init(void)
 	treo680_lcd_init();
 	palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
 			GPIO_NR_TREO680_SD_POWER, 0);
+	palmtreo680_docg4_flash_init();
 }
 #endif
 
-- 
1.7.8.6

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680
  2012-12-22 19:31 ` [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680 Mike Dunn
@ 2012-12-23  3:18   ` Marek Vasut
  2012-12-23 14:59     ` Mike Dunn
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2012-12-23  3:18 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Mike Dunn,

I think you should Cc Haojian (done)

> This patch gets the LCD working on my Palm Treo680.  Changing the Palm
> Centro code is avoided (I don't have a Centro for testing at the moment),
> but some initialization is shuffled around a bit.

I think I have a spare device somewhere around. I might get it available to you 
somehow eventually -- but that'll need some further discussion. Let's postpone 
it for now.

> This basically adds some code that manages the three gpios that interface
> to the lcd on the Treo 680.  The precise role of each gpio in the hardware
> architecture is not entirely clear to me; this patch is the result of
> trial-and-error and observing how the PalmOS code initializes the lcd.

Yay, good old times ;-)

> The need for this patch is not evident when Linux is loaded from PalmOS,
> because at that point the lcd-related gpios have already been configured. 
> But when booting the kernel by other means, this patch is required unless
> the bootloader has performed the necessary initialializations.

You mean U-Boot ? Makes sense.
[...]

>  static void __init treo680_init(void)
>  {
>  	pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
>  	palmphone_common_init();
> +	treo680_lcd_init();

I think you want to do treo680_gpio_configure() kind of thing and then call 
palm27x_lcd_init() from here.

Even better of course would be to integrate this kind of GPIO fiddling with the 
backlight subsystem, so the LCD can be properly powered down when going LPM.

>  	palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
>  			GPIO_NR_TREO680_SD_POWER, 0);
>  }
> @@ -438,6 +488,7 @@ static void __init centro_init(void)
>  {
>  	pxa2xx_mfp_config(ARRAY_AND_SIZE(centro685_pin_config));
>  	palmphone_common_init();
> +	palm27x_lcd_init(GPIO_NR_TREO_BL_POWER, &palm_320x320_new_lcd_mode);
>  	palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, -1,
>  			GPIO_NR_CENTRO_SD_POWER, 1);
>  }

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device
  2012-12-22 19:31 ` [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device Mike Dunn
@ 2012-12-23  3:20   ` Marek Vasut
  2012-12-23 15:10     ` Mike Dunn
  0 siblings, 1 reply; 11+ messages in thread
From: Marek Vasut @ 2012-12-23  3:20 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Mike Dunn,

> The #ifdefs around the leds-gpio device platform data are erroneous. 
> Currently the device is not instantiated on the centro unless
> CONFIG_MACH_TREO680 is defined.
> 
> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
> ---
> 
> The #ifdefs within palmtreo_leds_init() are a little ugly, but I think the
> only alternative would be to instantiate the leds-gpio device platform
> data for both treo680 and centro, which would require some of the #defines
> in palmtreo.h to be moved outside their containing #ifdef
> CONFIG_MACH_{TREO680,CENTRO}.

Shall we not just kill all those ifdefs and let GCC decide what to optimize out? 
I think this kind of simple stuff should just be optimized out anyway.

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization
  2012-12-22 19:31 ` [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization Mike Dunn
@ 2012-12-23  3:21   ` Marek Vasut
  2012-12-23 14:11   ` Sergei Shtylyov
  1 sibling, 0 replies; 11+ messages in thread
From: Marek Vasut @ 2012-12-23  3:21 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Mike Dunn,

> This patch adds initialization of the docg4 nand flash device to the
> treo680.
> 
> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization
  2012-12-22 19:31 ` [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization Mike Dunn
  2012-12-23  3:21   ` Marek Vasut
@ 2012-12-23 14:11   ` Sergei Shtylyov
  2012-12-23 15:18     ` Mike Dunn
  1 sibling, 1 reply; 11+ messages in thread
From: Sergei Shtylyov @ 2012-12-23 14:11 UTC (permalink / raw)
  To: linux-arm-kernel

Hello.

On 22-12-2012 23:31, Mike Dunn wrote:

> This patch adds initialization of the docg4 nand flash device to the treo680.

> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
> ---
>   arch/arm/mach-pxa/palmtreo.c |   31 +++++++++++++++++++++++++++++++
>   1 files changed, 31 insertions(+), 0 deletions(-)

> diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c
> index cb9cc7b..f3e2d08 100644
> --- a/arch/arm/mach-pxa/palmtreo.c
> +++ b/arch/arm/mach-pxa/palmtreo.c
> @@ -404,6 +404,36 @@ static void __init palmtreo_leds_init(void)
>   }
>
>   /******************************************************************************
> + * diskonchip docg4 flash
> + ******************************************************************************/
> +#if defined(CONFIG_MACH_TREO680)
> +/* REVISIT: does the centro have this device also? */
> +#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE)

    #if IS_ENABLED(CONFIG_MTD_NAND_DOCG4)

WBR, Sergei

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680
  2012-12-23  3:18   ` Marek Vasut
@ 2012-12-23 14:59     ` Mike Dunn
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Dunn @ 2012-12-23 14:59 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/22/2012 07:18 PM, Marek Vasut wrote:
> Dear Mike Dunn,
> 
> I think you should Cc Haojian (done)


Yes thanks you Marek, and my aplogies Haojian.  Actually I was negligent on the
CC's of all these patches.  When I repost, I'll expand the CC list.

[...]


> I think I have a spare device somewhere around. I might get it available to you 
> somehow eventually -- but that'll need some further discussion. Let's postpone 
> it for now.


I plan to start checking ebay soon.  The Treos seemed widely available last I
checked (at least the 680), and fairly cheap.

[...]


>> The need for this patch is not evident when Linux is loaded from PalmOS,
>> because at that point the lcd-related gpios have already been configured. 
>> But when booting the kernel by other means, this patch is required unless
>> the bootloader has performed the necessary initialializations.
> 
> You mean U-Boot ? Makes sense.


Well my u-boot port does initialize the lcd.  But generally, it shouldn't be
assumed.  I discovered the need for this when I loaded the kernel with the
emulator.  It's actually the secondary program loader that does the
initialization (when it displays the Palm logo).


> [...]
> 
>>  static void __init treo680_init(void)
>>  {
>>  	pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
>>  	palmphone_common_init();
>> +	treo680_lcd_init();
> 
> I think you want to do treo680_gpio_configure() kind of thing and then call 
> palm27x_lcd_init() from here.


I'm not 100% sure, but I think that the lcd controller has to be initialized
while the gpios are driven high, then after that, driving one of them low turns
the lcd on.  This is why palm27x_lcd_init() is called from within
treo680_lcd_init().  But yes, it could be cleaner if the hardware permits.  I'll
experiment some more.


> Even better of course would be to integrate this kind of GPIO fiddling with the 
> backlight subsystem, so the LCD can be properly powered down when going LPM.


Yes, this needs to be cleaned up.  The label "lcd power" is thrown around too
much, sometimes when actually referring to the backlight.  And power management
is another whole effort.  I'm hoping to be able to take things step by step.

[...]

Thanks for having a look Marek.  I'll see if the gpio initialization can be
separated from the lcd initialization.

MIke

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device
  2012-12-23  3:20   ` Marek Vasut
@ 2012-12-23 15:10     ` Mike Dunn
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Dunn @ 2012-12-23 15:10 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/22/2012 07:20 PM, Marek Vasut wrote:
> Dear Mike Dunn,
> 
>> The #ifdefs around the leds-gpio device platform data are erroneous. 
>> Currently the device is not instantiated on the centro unless
>> CONFIG_MACH_TREO680 is defined.
>>
>> Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
>> ---
>>
>> The #ifdefs within palmtreo_leds_init() are a little ugly, but I think the
>> only alternative would be to instantiate the leds-gpio device platform
>> data for both treo680 and centro, which would require some of the #defines
>> in palmtreo.h to be moved outside their containing #ifdef
>> CONFIG_MACH_{TREO680,CENTRO}.
> 
> Shall we not just kill all those ifdefs and let GCC decide what to optimize out? 
> I think this kind of simple stuff should just be optimized out anyway.


You're suggesting that all the #ifdef CONFIG_MACH_{TREO680,CENTRO} be removed
from palmtreo.h?  Yes, this might be better.  I'll look into it.

Thanks again,
Mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization
  2012-12-23 14:11   ` Sergei Shtylyov
@ 2012-12-23 15:18     ` Mike Dunn
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Dunn @ 2012-12-23 15:18 UTC (permalink / raw)
  To: linux-arm-kernel

On 12/23/2012 06:11 AM, Sergei Shtylyov wrote:

>>
>>   /******************************************************************************
>> + * diskonchip docg4 flash
>> + ******************************************************************************/
>> +#if defined(CONFIG_MACH_TREO680)
>> +/* REVISIT: does the centro have this device also? */
>> +#if defined(CONFIG_MTD_NAND_DOCG4) || defined(CONFIG_MTD_NAND_DOCG4_MODULE)
> 
>    #if IS_ENABLED(CONFIG_MTD_NAND_DOCG4)
> 
> WBR, Sergei
> 


Thanks Sergei.  I see this in kconfig.h now.  This will be another patch to
replace all the "if defined" in this file.

Mike

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-12-23 15:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-22 19:31 [PATCH 0/3] ARM: pxa: palmtreo: a few treo fixes Mike Dunn
2012-12-22 19:31 ` [PATCH 1/3] ARM: pxa: palmtreo: fix lcd initialization on treo680 Mike Dunn
2012-12-23  3:18   ` Marek Vasut
2012-12-23 14:59     ` Mike Dunn
2012-12-22 19:31 ` [PATCH 2/3] ARM: pxa: palmtreo: fix #ifdefs for leds-gpio device Mike Dunn
2012-12-23  3:20   ` Marek Vasut
2012-12-23 15:10     ` Mike Dunn
2012-12-22 19:31 ` [PATCH 3/3] ARM: pxa: palmtreo: add docg4 device initialization Mike Dunn
2012-12-23  3:21   ` Marek Vasut
2012-12-23 14:11   ` Sergei Shtylyov
2012-12-23 15:18     ` Mike Dunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).