update Treo680, generalise it and add Centro support - round 2
Subsystems (3)
Hi,
this is second round of patch set updating Treo680, generalising it and adding support for Palm Centro.
Changes since last time:
- patch set generated properly (with respect of file renames)
- fixed name of keyboard backlight LED (now treo680:white:keybbl, centro:white:keybbl)
Thanks for your time and comments.
Best regards,
Tomas Cech
PATCH 1/5 Treo680: pxamci simplify to use GPIO
From: Tom?? ?ech <sleep [email protected]>
--- arch/arm/mach-pxa/treo680.c | 84 ++---------------------------------------- 1 files changed, 4 insertions(+), 80 deletions(-)
arch/arm/mach-pxa/treo680.c +4 -80
@@ -153,87 +153,11 @@ static unsigned long treo680_pin_config[] __initdata = {/****************************************************************************** * SD/MMC card controller ******************************************************************************/ -static int treo680_mci_init (struct device *dev, -irq_handler_t treo680_detect_int,void *data) -{ -int err =0 ; - -/* Setup an interrupt for detecting card insert/remove events */ - err =gpio_request (GPIO_NR_TREO680_SD_DETECT_N ,"SD IRQ" ); - -if (err) - goto err; - - err =gpio_direction_input (GPIO_NR_TREO680_SD_DETECT_N ); -if (err) - goto err2; - - err =request_irq (gpio_to_irq (GPIO_NR_TREO680_SD_DETECT_N ), - treo680_detect_int,IRQF_DISABLED |IRQF_SAMPLE_RANDOM | -IRQF_TRIGGER_FALLING |IRQF_TRIGGER_RISING , -"SD/MMC card detect" , data); - -if (err) { -dev_err (dev,"%s: cannot request SD/MMC card detect IRQ\n" , - __func__); - goto err2; - } - - err =gpio_request (GPIO_NR_TREO680_SD_POWER ,"SD_POWER" ); -if (err) - goto err3; - - err =gpio_direction_output (GPIO_NR_TREO680_SD_POWER ,1 ); -if (err) - goto err4; - - err =gpio_request (GPIO_NR_TREO680_SD_READONLY ,"SD_READONLY" ); -if (err) - goto err4; - - err =gpio_direction_input (GPIO_NR_TREO680_SD_READONLY ); -if (err) - goto err5; - -return 0 ; - -err5: -gpio_free (GPIO_NR_TREO680_SD_READONLY ); -err4: -gpio_free (GPIO_NR_TREO680_SD_POWER ); -err3: -free_irq (gpio_to_irq (GPIO_NR_TREO680_SD_DETECT_N ), data); -err2: -gpio_free (GPIO_NR_TREO680_SD_DETECT_N ); -err: -return err; -} - -static void treo680_mci_exit (struct device *dev,void *data) -{ -gpio_free (GPIO_NR_TREO680_SD_READONLY ); -gpio_free (GPIO_NR_TREO680_SD_POWER ); -free_irq (gpio_to_irq (GPIO_NR_TREO680_SD_DETECT_N ), data); -gpio_free (GPIO_NR_TREO680_SD_DETECT_N ); -} - -static void treo680_mci_power (struct device *dev,unsigned int vdd) -{ -struct pxamci_platform_data *p_d = dev->platform_data; -gpio_set_value (GPIO_NR_TREO680_SD_POWER , p_d->ocr_mask & (1 << vdd)); -} - -static int treo680_mci_get_ro (struct device *dev) -{ -return gpio_get_value (GPIO_NR_TREO680_SD_READONLY ); -} -static struct pxamci_platform_data treo680_mci_platform_data = { - .ocr_mask =MMC_VDD_32_33 |MMC_VDD_33_34 , - .setpower = treo680_mci_power, - .get_ro = treo680_mci_get_ro, - .init = treo680_mci_init, - .exit = treo680_mci_exit, + .ocr_mask =MMC_VDD_32_33 |MMC_VDD_33_34 , + .gpio_card_detect =GPIO_NR_TREO680_SD_DETECT_N , + .gpio_card_ro =GPIO_NR_TREO680_SD_READONLY , + .gpio_power =GPIO_NR_TREO680_SD_POWER , };/******************************************************************************
Signature · 1 line
1.6.3.3
PATCH 2/5 Treo680: remove unused LCD power GPIO
From: Tom?? ?ech <sleep [email protected]>
--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)
arch/arm/mach-pxa/treo680.c +1 -9
@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:
@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }static struct platform_pwm_backlight_data treo680_backlight_data = {
Signature · 1 line
1.6.3.3
PATCH 3/5 Treo680: fix freed GPIO in treo680_irda_shutdown()
From: Tom?? ?ech <sleep [email protected]>
--- arch/arm/mach-pxa/treo680.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/treo680.c +1 -1
@@ -325,7 +325,7 @@ err1:static void treo680_irda_shutdown (struct device *dev) { -gpio_free (GPIO_NR_TREO680_AMP_EN ); +gpio_free (GPIO_NR_TREO680_IR_EN ); }static struct pxaficp_platform_data treo680_ficp_info = {
Signature · 1 line
1.6.3.3
PATCH 4/5 PalmGSM: generalisation of Treo680 code to PalmGSM
From: Tom?? ?ech <sleep [email protected]>
---
arch/arm/mach-pxa/Kconfig | 5 +
arch/arm/mach-pxa/Makefile | 2 +-
arch/arm/mach-pxa/include/mach/palmgsm.h | 60 +++++++++
arch/arm/mach-pxa/include/mach/treo680.h | 49 -------
arch/arm/mach-pxa/{treo680.c => palmgsm.c} | 197 ++++++++++++++++------------
5 files changed, 180 insertions(+), 133 deletions(-)
create mode 100644 arch/arm/mach-pxa/include/mach/palmgsm.h
delete mode 100644 arch/arm/mach-pxa/include/mach/treo680.h
rename arch/arm/mach-pxa/{treo680.c => palmgsm.c} (69%)arch/arm/mach-pxa/Kconfig +5 -0
@@ -401,12 +401,17 @@ config MACH_PALMZ72 Say Y here if you intend to run this kernel on Palm Zire 72 handheld computer. +config PALMGSM + depends on ARCH_PXA_PALM + bool + config MACH_TREO680 bool "Palm Treo 680" default y depends on ARCH_PXA_PALM select PXA27x select IWMMXT + select PALMGSM help Say Y here if you intend to run this kernel on Palm Treo 680 smartphone.
arch/arm/mach-pxa/Makefile +1 -1
@@ -62,7 +62,7 @@ obj-$(CONFIG_MACH_PALMT5) += palmt5.o obj-$(CONFIG_MACH_PALMTX) += palmtx.o obj-$(CONFIG_MACH_PALMLD) += palmld.o obj-$(CONFIG_MACH_PALMZ72) += palmz72.o -obj-$(CONFIG_MACH_TREO680) += treo680.o +obj-$(CONFIG_PALMGSM) += palmgsm.o obj-$(CONFIG_ARCH_VIPER) += viper.o ifeq ($(CONFIG_MACH_ZYLONITE),y)
arch/arm/mach-pxa/include/mach/palmgsm.h new file +60 -0
60 lines not on this page · raw message
arch/arm/mach-pxa/include/mach/treo680.h deleted +0 -49
49 lines not on this page · raw message
arch/arm/mach-pxa/palmgsm.c renamed from arch/arm/mach-pxa/treo680.c +114 -83
444 lines not on this page · raw message
Signature · 1 line
1.6.3.3
PATCH 5/5 PalmGSM: add basic Centro support
From: Tom?? ?ech <sleep [email protected]>
--- arch/arm/mach-pxa/Kconfig | 11 ++ arch/arm/mach-pxa/include/mach/palmgsm.h | 7 ++ arch/arm/mach-pxa/palmgsm.c | 160 ++++++++++++++++++++++++++++++ arch/arm/mm/mmu.c | 2 +- 4 files changed, 179 insertions(+), 1 deletions(-)
arch/arm/mach-pxa/Kconfig +11 -0
@@ -405,6 +405,17 @@ config PALMGSM depends on ARCH_PXA_PALM bool +config MACH_CENTRO + bool "Palm Centro 685" + default y + depends on ARCH_PXA_PALM + select PXA27x + select IWMMXT + select PALMGSM + help + Say Y here if you intend to run this kernel on Palm Centro 685 + smartphone. + config MACH_TREO680 bool "Palm Treo 680" default y
arch/arm/mach-pxa/include/mach/palmgsm.h +7 -0
@@ -3,6 +3,7 @@* * currently supported: * Palm Treo 680 (GSM) +* Palm Centro 685 (GSM) * * Author: Tomas Cech <[email protected]> *
@@ -45,6 +46,12 @@#define GPIO_NR_TREO680_KEYB_BL 24#define GPIO_NR_TREO680_BT_EN 43 +/* Centro685 specific GPIOs */ +#define GPIO_NR_CENTRO_SD_POWER 21 +#define GPIO_NR_CENTRO_VIBRATE_EN 22 +#define GPIO_NR_CENTRO_KEYB_BL 33 +#define GPIO_NR_CENTRO_BT_EN 80 +/* Various addresses */ #define PALMGSM_PHYS_RAM_START 0xa0000000#define PALMGSM_PHYS_IO_START 0x40000000
arch/arm/mach-pxa/palmgsm.c +160 -0
199 lines not on this page · raw message
arch/arm/mm/mmu.c +1 -1
@@ -836,7 +836,7 @@ void __init reserve_node_zero(pg_data_t *pgdat) BOOTMEM_EXCLUSIVE); } -if (machine_is_treo680 ()) { +if (machine_is_treo680 () ||machine_is_centro ()) {reserve_bootmem_node (pgdat,0xa0000000 ,0x1000 ,BOOTMEM_EXCLUSIVE ); reserve_bootmem_node(pgdat, 0xa2000000, 0x1000,
Signature · 1 line
1.6.3.3
PATCH 3/5 Treo680: fix freed GPIO in treo680_irda_shutdown()
In reply to Tomáš ČechDne Po 31. srpna 2009 19:25:59 Tom?? ?ech napsal(a):
Quoted 13 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-pxa/treo680.c +0
-0
arch/arm/mach-pxa/treo680.c err1: · line 331
Quoted 8 lines
arch/arm/mach-pxa/treo680.c +1
-1@@ -325,7 +325,7 @@ err1:static void treo680_irda_shutdown (struct device *dev) { -gpio_free (GPIO_NR_TREO680_AMP_EN ); +gpio_free (GPIO_NR_TREO680_IR_EN ); }static struct pxaficp_platform_data treo680_ficp_info = {
...
Seems OK to me, I think the first three patches can go in as is, Eric, could you merge them? Thanks
PATCH 3/5 Treo680: fix freed GPIO in treo680_irda_shutdown()
Quoted 21 lines · Marek Vasut
Dne Po 31. srpna 2009 19:25:59 Tom?? ?ech napsal(a):
Quoted 20 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-pxa/treo680.c +1
-1@@ -325,7 +325,7 @@ err1:static void treo680_irda_shutdown (struct device *dev) { -gpio_free (GPIO_NR_TREO680_AMP_EN ); +gpio_free (GPIO_NR_TREO680_IR_EN ); }
Quoted 8 lines
arch/arm/mach-pxa/treo680.c err1: · line 331
Quoted 1 line
arch/arm/mach-pxa/treo680.c +0
-0static struct pxaficp_platform_data treo680_ficp_info = {...
Seems OK to me, I think the first three patches can go in as is, Eric, could you merge them? Thanks
Acked-by Marek Vasut <[email protected]>
This has been merged by Russell in his patch tracking system, so really don't need to go via my tree now.
PATCH 2/5 Treo680: remove unused LCD power GPIO
In reply to Tomáš ČechDne Po 31. srpna 2009 19:25:58 Tom?? ?ech napsal(a):
Quoted 31 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)arch/arm/mach-pxa/treo680.c +1
-8@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:
arch/arm/mach-pxa/treo680.c static int treo680_backlight_notify(int brightness) · line 277
Quoted 7 lines
arch/arm/mach-pxa/treo680.c +0
-1@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }static struct platform_pwm_backlight_data treo680_backlight_data = {
Why was that GPIO there before then? Does this have any effect on the boot problems you are experiencing with Centro/T680? Otherwise seems OK to me
PATCH 2/5 Treo680: remove unused LCD power GPIO
Hi,
Dne Po 31. srpna 2009 19:34:51 Marek Vasut napsal(a):
Quoted 38 lines
Dne Po 31. srpna 2009 19:25:58 Tom?? ?ech napsal(a):
Quoted 37 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)arch/arm/mach-pxa/treo680.c +1
-9@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }
Quoted 4 lines
arch/arm/mach-pxa/treo680.c static int treo680_backlight_notify(int brightness) · line 277
Quoted 1 line
arch/arm/mach-pxa/treo680.c +0
-0static struct platform_pwm_backlight_data treo680_backlight_data = {Why was that GPIO there before then? Does this have any effect on the boot problems you are experiencing with Centro/T680? Otherwise seems OK to me
I used it first in brightness setting for 0 value. I found it not good idea. I removed it from function, but I wanted to keep GPIO registered and direction set. But it can work well even without that and I'd like to add some function to export some control GPIOs through /sys/class/gpio interface (bluetooth power, GSM power, GSM reset...) - this GPIO will be also exported there...
Best regards,
Tomas Cech
PATCH 2/5 Treo680: remove unused LCD power GPIO
Quoted 41 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
Dne Po 31. srpna 2009 19:34:51 Marek Vasut napsal(a):
Quoted 38 lines
Dne Po 31. srpna 2009 19:25:58 Tom?? ?ech napsal(a):
Quoted 37 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)arch/arm/mach-pxa/treo680.c +1
-9@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }
Quoted 6 lines
Quoted 3 lines
arch/arm/mach-pxa/treo680.c static int treo680_backlight_notify(int brightness) · line 277
Quoted 1 line
arch/arm/mach-pxa/treo680.c +0
-0static struct platform_pwm_backlight_data treo680_backlight_data = {Why was that GPIO there before then? Does this have any effect on the boot problems you are experiencing with Centro/T680? Otherwise seems OK to me
I used it first in brightness setting for 0 value. I found it not good idea. I removed it from function, but I wanted to keep GPIO registered and direction set. But it can work well even without that and I'd like to add some function to export some control GPIOs through
/sys/class/gpiointerface (bluetooth power, GSM power, GSM reset...) - this GPIO will be also exported there...
The name sounds like a GPIO for the power of the LCD panel itself, does it make sense to have this somewhere in the LCD power_{on,off} hooks?
PATCH 2/5 Treo680: remove unused LCD power GPIO
Hi,
Dne ?t 1. z??? 2009 11:49:24 Eric Miao napsal(a):
Quoted 46 lines
Quoted 45 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
Dne Po 31. srpna 2009 19:34:51 Marek Vasut napsal(a):
Quoted 41 lines
Dne Po 31. srpna 2009 19:25:58 Tom?? ?ech napsal(a):
Quoted 31 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)arch/arm/mach-pxa/treo680.c +1
-8@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:arch/arm/mach-pxa/treo680.c static int treo680_backlight_notify(int brightness) · line 277
Quoted 7 lines
arch/arm/mach-pxa/treo680.c +0
-1@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }static struct platform_pwm_backlight_data treo680_backlight_data = {Why was that GPIO there before then? Does this have any effect on the boot problems you are experiencing with Centro/T680? Otherwise seems OK to me
Quoted 7 lines
Quoted 2 lines
I used it first in brightness setting for 0 value. I found it not good idea. I removed it from function, but I wanted to keep GPIO registered and direction set. But it can work well even without that and I'd like to add some function to export some control GPIOs through
/sys/class/gpiointerface (bluetooth power, GSM power, GSM reset...) - this GPIO will be also exported there...The name sounds like a GPIO for the power of the LCD panel itself, does it make sense to have this somewhere in the LCD power_{on,off} hooks?
Yes, it would be much better.
I was looking for the right place - did you mean pxafb_mach_info.pxafb_lcd_power?
Thanks
Best regards,
Tomas Cech
PATCH 2/5 Treo680: remove unused LCD power GPIO
Quoted 50 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
Dne ?t 1. z??? 2009 11:49:24 Eric Miao napsal(a):
Quoted 47 lines
Quoted 46 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
Dne Po 31. srpna 2009 19:34:51 Marek Vasut napsal(a):
Quoted 38 lines
Dne Po 31. srpna 2009 19:25:58 Tom?? ?ech napsal(a):
Quoted 37 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)arch/arm/mach-pxa/treo680.c +1
-9@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }Quoted 3 lines
arch/arm/mach-pxa/treo680.c static int treo680_backlight_notify(int brightness) · line 277
Quoted 1 line
arch/arm/mach-pxa/treo680.c +0
-0static struct platform_pwm_backlight_data treo680_backlight_data = {Why was that GPIO there before then? Does this have any effect on the boot problems you are experiencing with Centro/T680? Otherwise seems OK to me
I used it first in brightness setting for 0 value. I found it not good idea. I removed it from function, but I wanted to keep GPIO registered and direction set. But it can work well even without that and I'd like to add some function to export some control GPIOs through
/sys/class/gpiointerface (bluetooth power, GSM power, GSM reset...) - this GPIO will be also exported there...
Quoted 8 lines
Quoted 4 lines
The name sounds like a GPIO for the power of the LCD panel itself, does it make sense to have this somewhere in the LCD power_{on,off} hooks?
Yes, it would be much better.
I was looking for the right place - did you mean pxafb_mach_info.pxafb_lcd_power?
I think so.
PATCH 2/5 Treo680: remove unused LCD power GPIO
Hi,
Dne ?t 1. z??? 2009 13:42:14 Eric Miao napsal(a):
Quoted 56 lines
Quoted 55 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
Dne ?t 1. z??? 2009 11:49:24 Eric Miao napsal(a):
Quoted 51 lines
Quoted 41 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
Dne Po 31. srpna 2009 19:34:51 Marek Vasut napsal(a):
Quoted 38 lines
Dne Po 31. srpna 2009 19:25:58 Tom?? ?ech napsal(a):
Quoted 37 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-)arch/arm/mach-pxa/treo680.c +1
-9@@ -254,16 +254,9 @@ static int treo680_backlight_init(struct device *dev) ret =gpio_direction_output (GPIO_NR_TREO680_BL_POWER ,0 );if (ret) goto err2; - ret =gpio_request (GPIO_NR_TREO680_LCD_POWER ,"LCD POWER" ); -if (ret) - goto err2; - ret =gpio_direction_output (GPIO_NR_TREO680_LCD_POWER ,0 ); -if (ret) - goto err3;return 0 ; -err3: -gpio_free (GPIO_NR_TREO680_LCD_POWER ); + err2:gpio_free (GPIO_NR_TREO680_BL_POWER ); err:@@ -279,7 +272,6 @@ static int treo680_backlight_notify(int brightness)static void treo680_backlight_exit (struct device *dev) {gpio_free (GPIO_NR_TREO680_BL_POWER ); -gpio_free (GPIO_NR_TREO680_LCD_POWER ); }Quoted 5 lines
Quoted 3 lines
arch/arm/mach-pxa/treo680.c static int treo680_backlight_notify(int brightness) · line 277
Quoted 1 line
arch/arm/mach-pxa/treo680.c +0
-0static struct platform_pwm_backlight_data treo680_backlight_data = {Why was that GPIO there before then? Does this have any effect on the boot problems you are experiencing with Centro/T680? Otherwise seems OK to me
I used it first in brightness setting for 0 value. I found it not good idea. I removed it from function, but I wanted to keep GPIO registered and direction set. But it can work well even without that and I'd like to add some function to export some control GPIOs through
/sys/class/gpiointerface (bluetooth power, GSM power, GSM reset...) - this GPIO will be also exported there...The name sounds like a GPIO for the power of the LCD panel itself, does it make sense to have this somewhere in the LCD power_{on,off} hooks?
Quoted 6 lines
Quoted 3 lines
Yes, it would be much better.
I was looking for the right place - did you mean pxafb_mach_info.pxafb_lcd_power?I think so.
There can be problem with this. It's easy to create such function, but there is no place for initialization so I would need to call gpio_register() and gpio_direction_output() in machine init function or even elsewhere which I find a bit nasty. Should I try to update pxafb to support LCD power through GPIO too or go nasty way?
Thanks
Best regards,
Tomas Cech
PATCH 1/5 Treo680: pxamci simplify to use GPIO
In reply to Tomáš ČechDne Po 31. srpna 2009 19:25:57 Tom?? ?ech napsal(a):
arch/arm/mach-pxa/treo680.c
Quoted 13 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>--- arch/arm/mach-pxa/treo680.c | 84++---------------------------------------- 1 files changed, 4 insertions(+), 80 deletions(-)
arch/arm/mach-pxa/treo680.c +0
-0
...
Seems OK to me
Eric Miao
AppliedPATCH 1/5 Treo680: pxamci simplify to use GPIO
2009/9/1 Marek Vasut <[email protected]>:
Quoted 17 lines
Dne Po 31. srpna 2009 19:25:57 Tom?? ?ech napsal(a):
Quoted 13 lines
From: Tom?? ?ech <sleep [email protected]>
Signed-off-by Tom?? ?ech <[email protected]>---
?arch/arm/mach-pxa/treo680.c | ? 84 ++---------------------------------------- 1 files changed, 4 insertions(+), 80 deletions(-)arch/arm/mach-pxa/treo680.c +0
-0...
Quoted 4 lines
Seems OK to me
Acked-by Marek Vasut <[email protected]>
Applied.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/5 Treo680: remove unused LCD power GPIO
(sorry this might be html,send from my g1).
currently, I dont think gpio for pxafb is necessary, request and init in board_init() should be just ok.
On Sep 2, 2009 12:14 AM, "Tom?? 'Sleep_Walker' ?ech" < [email protected]> wrote:
Hi,
Dne ?t 1. z??? 2009 13:42:14 Eric Miao napsal(a):
Quoted 1 line
Tom?? '
Sleep_Walker' ?ech wrote: > > Hi, > > > > Dne ?t 1. z??? 2009
11:49:24 Eric Miao napsal(a)...
There can be problem with this. It's easy to create such function, but there is no place for initialization so I would need to call gpio_register() and gpio_direction_output() in machine init function or even elsewhere which I find a bit nasty. Should I try to update pxafb to support LCD power through GPIO too or go nasty way?
Thanks Best regards, Tomas Cech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090902/6d8e7e61/attachment.htm>
PATCH 2/5 Treo680: remove unused LCD power GPIO
Hi,
Dne St 2. z??? 2009 08:28:51 Eric Miao napsal(a):
Quoted 3 lines
(sorry this might be html,send from my g1).
currently, I dont think gpio for pxafb is necessary, request and init inboard_init()should be just ok.
ok then. Here goes patch.
Best regards,
Tomas Cech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Treo680-move-LCD-power-GPIO-to-proper-place.patch
Type: text/x-patch
Size: 2734 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090902/3286c3b4/attachment.bin>
PATCH 2/5 Treo680: remove unused LCD power GPIO
Hi,
I discussed it with Marex after his kind review and I just set pxafb_lcd_power property according to GPIO initialization success.
Best regards,
Tomas Cech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Treo680-move-LCD-power-GPIO-to-proper-place.patch
Type: text/x-patch
Size: 2488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090903/0ceebf05/attachment.bin>
PATCH 2/5 Treo680: remove unused LCD power GPIO
Hi,
I discussed it with Marex again after his kind review and I created some special function for it to remain machine_init function clean. I hope this one is clean enough to be accepted.
Best regards,
Tomas Cech
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Treo680-move-LCD-power-GPIO-to-proper-place.patch
Type: text/x-patch
Size: 2647 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090903/f431fc0b/attachment.bin>
PATCH 2/5 Treo680: remove unused LCD power GPIO
Quoted 4 lines · Tom?? 'Sleep_Walker' ?ech
Hi,
I discussed it with Marex again after his kind review and I created some special function for it to remain
machine_initfunction clean. I hope this one is clean enough to be accepted.
OK, applied, with printk(KERN_ERR changed to pr_err()
PATCH 2/5 Treo680: remove unused LCD power GPIO
Quoted 1 line
OK, applied, with printk(KERN_ERR changed to
pr_err()
Thanks.
Tomas Cech