Hi,
you will find attached a new X50 patch.
It is mainly a modified version of the device-independent
ADS7846/TSC2046 driver released by Paul a few days ago :
- Kconfig takes into account all X50 variants (not really required for
now, but allow to manage cleanly the axim family),
- aximx50.c. includes the touchscreen driver information, and some
unuseful udc code has been removed,
- ads7846ts_ssp.c : read_xydata is now less value-dependent, and a
mechanism derived from the tsc2046 driver to detect pen release (based
on gpio) has been added. ADS/TSC commands are now on 24 bits,
- ads7846_adc_ssp.c : re-use initialization from tsc2046 driver,
As I can not build familiar, I did not test it with tslib tools, but it
should work. If someone could confirm...
Paul : I don't think this patch should be integrated as is, but it may
help you to adapt your driver.
Comments and remarks are welcome,
Pierre
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/arch/arm/mach-pxa/aximx50/aximx50.c kernel26/arch/arm/mach-pxa/aximx50/aximx50.c
--- kernel26_vanilla/arch/arm/mach-pxa/aximx50/aximx50.c 2007-01-23 20:34:51.000000000 +0100
+++ kernel26/arch/arm/mach-pxa/aximx50/aximx50.c 2007-02-03 00:13:42.087057027 +0100
@@ -37,10 +37,14 @@
#include <asm/hardware/gpio_keys.h>
#include <asm/arch/udc.h>
+#include <linux/irq.h>
+#include <linux/spi/ads7846ts_ssp.h>
+
#include "../generic.h"
+#if defined(CONFIG_SUBARCH_X50V) || defined(CONFIG_SUBARCH_X51V)
+
/* Description of the X50(v)/X51(v) display modes */
-#ifdef CONFIG_X50V
static struct pxafb_mode_info aximx50_pxafb_modes[] = {
{
.pixclock = 96153,
@@ -73,6 +77,7 @@
};
#else
+/* Description of the X50/X51 display modes */
static struct pxafb_mode_info aximx50_pxafb_modes[] = {
{
.pixclock = 96153,
@@ -125,7 +130,6 @@
static int
udc_detect(void)
{
- printk (KERN_NOTICE "entering/leaving udc_detect\n");
return 0;
}
@@ -135,24 +139,40 @@
switch (cmd)
{
case PXA2XX_UDC_CMD_DISCONNECT:
- printk (KERN_NOTICE "USB cmd disconnect\n");
- SET_X50_GPIO(USB_PUEN, 0);
+ // Do nothing ?
break;
case PXA2XX_UDC_CMD_CONNECT:
- printk (KERN_NOTICE "USB cmd connect\n");
- SET_X50_GPIO(USB_PUEN, 1);
+ // Do nothing ?
break;
}
}
+
static struct pxa2xx_udc_mach_info x50_udc_mach_info = {
.udc_is_connected = udc_detect,
.udc_command = udc_enable,
};
+struct ads7846ts_ssp_platform_data x50_ts_params = {
+ .irq = X50_IRQ(PEN_IRQ_N),
+ .gpio = GPIO_NR_X50_PEN_IRQ_N,
+};
-static struct platform_device *devices[] __initdata = {};
+static struct platform_device x50_ts = {
+ .name = "ads7846ts-ssp",
+ .dev = {
+ .platform_data = &x50_ts_params,
+ }
+};
+static struct platform_device x50_adc = {
+ .name = "ads7846-ssp",
+};
+
+static struct platform_device *devices[] __initdata = {
+ &x50_ts,
+ &x50_adc,
+};
static void __init x50_init( void )
{
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/arch/arm/mach-pxa/aximx50/Kconfig kernel26/arch/arm/mach-pxa/aximx50/Kconfig
--- kernel26_vanilla/arch/arm/mach-pxa/aximx50/Kconfig 2007-01-23 20:34:50.000000000 +0100
+++ kernel26/arch/arm/mach-pxa/aximx50/Kconfig 2007-01-29 22:31:38.010464288 +0100
@@ -7,12 +7,24 @@
series of PDAs. Currently there is only basic support for this
type of PDAs.
-config X50V
+choice
+ prompt "Axim system"
+ depends on MACH_X50
+ default X51V
+
+config SUBARCH_X50
+ bool "Dell Axim X50/X51"
+ depends on MACH_X50
+ help
+ Set this if you have an Axim X50 or X51.
+
+config SUBARCH_X50V
bool "Dell Axim X50v/X51v"
depends on MACH_X50
- default false
help
- Set this if you have the "v" variant of Axim X50/X51.
+ Set this if you have an Axim X50v or X51v.
+
+endchoice
config DRAM_BASE
hex '(S)DRAM Base Address'
@@ -21,4 +33,3 @@
help
On the Dell Axim X50/X51(v), RAM starts at 0xa8000000. You should not
need to modify this value.
-
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/drivers/input/touchscreen/ads7846ts_ssp.c kernel26/drivers/input/touchscreen/ads7846ts_ssp.c
--- kernel26_vanilla/drivers/input/touchscreen/ads7846ts_ssp.c 2007-01-28 00:39:32.000000000 +0100
+++ kernel26/drivers/input/touchscreen/ads7846ts_ssp.c 2007-02-02 23:29:45.438995853 +0100
@@ -21,18 +21,36 @@
#include <linux/input.h>
#include <linux/platform_device.h>
#include <linux/spi/ads7846ts_ssp.h>
+#include <linux/spi/ads7846_ssp.h>
+#include <asm/arch/pxa-regs.h>
#include <asm/arch/hardware.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
-#define SAMPLE_TIMEOUT 20 /* sample every 20ms */
+#define SAMPLE_TIMEOUT 20 /* default sample every 20ms */
-extern u32 ads7846_ssp_putget(u32 data);
+#define CTRL_START 0x800000
+#define CTRL_YPOS 0x100000
+#define CTRL_Z1POS 0x300000
+#define CTRL_Z2POS 0x400000
+#define CTRL_XPOS 0x500000
+#define CTRL_TEMP0 0x040000
+#define CTRL_TEMP1 0x740000
+#define CTRL_VBAT 0x240000
+#define CTRL_AUX_N 0x640000
+#define CTRL_PD0 0x010000
+#define CTRL_PD1 0x020000
+
+#define abscmpmin(x,y,d) ( ((int)((x) - (y)) < (int)(d)) && ((int)((y) - (x)) < (int)(d)) )
+
+typedef struct ts_pos_s {
+ unsigned long xd;
+ unsigned long yd;
+} ts_pos_t;
static struct timer_list timer_pen;
static struct input_dev *idev;
-
static int irq_disable;
static int touch_pressed;
@@ -45,98 +63,36 @@
input_sync(idev);
}
-#define CTRL_START 0x80
-#define CTRL_YPOS 0x10
-#define CTRL_Z1POS 0x30
-#define CTRL_Z2POS 0x40
-#define CTRL_XPOS 0x50
-#define CTRL_TEMP0 0x04
-#define CTRL_TEMP1 0x74
-#define CTRL_VBAT 0x24
-#define CTRL_AUX_N 0x64
-#define CTRL_PD0 0x01
-#define CTRL_PD1 0x02
-
-#define SSSR_TNF_MSK (1u << 2)
-#define SSSR_RNE_MSK (1u << 3)
-
-#define ADSCTRL_ADR_SH 4 // Address setting
-
-typedef struct ts_pos_s {
- unsigned long xd;
- unsigned long yd;
-} ts_pos_t;
-
void read_xydata(ts_pos_t *tp)
{
-#define abscmpmin(x,y,d) ( ((int)((x) - (y)) < (int)(d)) && ((int)((y) - (x)) < (int)(d)) )
unsigned long cmd;
- unsigned int t, x, y, z[2];
- unsigned long pressure;
- int i,j,k;
- int d = 8, c = 10;
- int err = 0;
-
- for(i = j = k = 0, x = y = 0;; i = 1) {
- /* Pressure */
- cmd = CTRL_PD0 | CTRL_PD1 | CTRL_START | CTRL_Z1POS;
- t = ads7846_ssp_putget(cmd);
- z[i] = ads7846_ssp_putget(cmd);
-
- if (i)
- break;
-
- /* X-axis */
- cmd = CTRL_PD0 | CTRL_PD1 | CTRL_START | CTRL_XPOS;
+ unsigned int t, x, y;
+ int i;
+ int d = 200, c = 10;
+
+ /* X-axis */
+ cmd = CTRL_PD0 | CTRL_PD1 | CTRL_START | CTRL_XPOS;
+ x = ads7846_ssp_putget(cmd);
+ for(i = 0; i < c; i++) {
+ t = x;
x = ads7846_ssp_putget(cmd);
- for(j = 0; !err; j++) {
- t = x;
- x = ads7846_ssp_putget(cmd);
- if (abscmpmin(t, x, d))
- break;
- if (j > c) {
- err = 1;
- //printk("ts: x(%d,%d,%d)\n", t, x, t - x);
- }
- }
+ if (abscmpmin(t, x, d))
+ break;
+ }
- /* Y-axis */
- cmd = CTRL_PD0 | CTRL_PD1 | CTRL_START | CTRL_YPOS;
+ /* Y-axis */
+ cmd = CTRL_PD0 | CTRL_PD1 | CTRL_START | CTRL_YPOS;
+ y = ads7846_ssp_putget(cmd);
+ for (i = 0; i < c; i++) {
+ t = y;
y = ads7846_ssp_putget(cmd);
- for (k = 0; !err; k++) {
- t = y;
- y = ads7846_ssp_putget(cmd);
- if (abscmpmin(t ,y , d))
- break;
- if (k > c) {
- err = 1;
- //printk("ts: y(%d,%d,%d)\n", t, y, t - y);
- }
- }
- }
- pressure = 1;
- for (i = 0; i < 2; i++) {
- if (!z[i])
- pressure = 0;
- }
- if (pressure) {
- for (i = 0; i < 2; i++){
- if (z[i] < 10)
- err = 1;
- }
- if (x >= 4095)
- err = 1;
+ if (abscmpmin(t ,y, d))
+ break;
}
cmd &= ~(CTRL_PD0 | CTRL_PD1);
t = ads7846_ssp_putget(cmd);
-
- if (err == 0 && pressure != 0) {
- //printk("ts: pxyp=%d(%d/%d,%d/%d)%d\n", z[0], x, j, y, k, z[1]);
- } else {
- //printk("pxype=%d,%d,%d,%d\n", z[0], x, y, z[1]);
- x = 0; y = 0;
- }
+
tp->xd = x;
tp->yd = y;
}
@@ -145,32 +101,26 @@
{
struct ads7846ts_ssp_platform_data *params = data;
ts_pos_t ts_pos;
-
if (irq == params->irq && irq_disable == 0) {
- //printk("IRQ\n");
irq_disable = 1;
disable_irq(params->irq);
}
- read_xydata(&ts_pos);
-
- if (ts_pos.xd == 0 || ts_pos.yd == 0) {
+ if (GPLR(params->gpio) & GPIO_bit(params->gpio)) {
report_touchpanel(0, 0, 0);
- //printk("touch released\n");
if (irq_disable == 1) {
enable_irq(params->irq);
irq_disable = 0;
}
- return IRQ_HANDLED;
}
+ else
+ {
+ read_xydata(&ts_pos);
+ //printk("%04d %04d\n", (int)ts_pos.xd, (int)ts_pos.yd);
+ report_touchpanel(ts_pos.xd, ts_pos.yd, 1);
- //printk("%04d %04d\n", (int)ts_pos.xd, (int)ts_pos.yd);
- //printk("touch pressed\n");
- report_touchpanel(ts_pos.xd, ts_pos.yd, 1);
-
- mod_timer(&timer_pen, jiffies + (SAMPLE_TIMEOUT * HZ) / 1000);
-
- //printk("callback\n");
+ mod_timer(&timer_pen, jiffies + (SAMPLE_TIMEOUT * HZ) / 1000);
+ }
return IRQ_HANDLED;
};
@@ -211,17 +161,17 @@
set_bit(BTN_TOUCH, idev->keybit);
idev->absmin[ABS_PRESSURE] = 0;
idev->absmax[ABS_PRESSURE] = 1;
- idev->absmin[ABS_X] = 190;
- idev->absmax[ABS_X] = 1860;
- idev->absmin[ABS_Y] = 150;
- idev->absmax[ABS_Y] = 1880;
+ idev->absmin[ABS_X] = 0;
+ idev->absmax[ABS_X] = 0;
+ idev->absmin[ABS_Y] = 32767;
+ idev->absmax[ABS_Y] = 32767;
input_register_device(idev);
touch_pressed = 0;
irq_disable = 0;
set_irq_type(params->irq, IRQT_FALLING);
- request_irq(params->irq, ads7846ts_ssp_isr, SA_SAMPLE_RANDOM, "ads7846ts-ssp", params);
+ request_irq(params->irq, ads7846ts_ssp_isr, SA_INTERRUPT, "ads7846ts-ssp", params);
return 0;
}
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/drivers/misc/adc/ads7846_adc_ssp.c kernel26/drivers/misc/adc/ads7846_adc_ssp.c
--- kernel26_vanilla/drivers/misc/adc/ads7846_adc_ssp.c 2006-12-09 01:49:19.000000000 +0100
+++ kernel26/drivers/misc/adc/ads7846_adc_ssp.c 2007-02-02 23:48:49.193305817 +0100
@@ -17,10 +17,8 @@
#include <linux/fs.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
-#include <linux/pm.h>
#include <linux/device.h>
#include <linux/delay.h>
-#include <linux/sysctl.h>
#include <linux/platform_device.h>
#include <asm/mach/map.h>
@@ -33,9 +31,6 @@
static spinlock_t ads7846_ssp_lock = SPIN_LOCK_UNLOCKED;
-#define SSSR_TNF_MSK (1u << 2)
-#define SSSR_RNE_MSK (1u << 3)
-
u32 ads7846_ssp_putget(u32 data)
{
u32 ret;
@@ -44,23 +39,23 @@
spin_lock_irqsave(&ads7846_ssp_lock, flags);
- SSDR = data;
-
timeout = 100000;
- while ((SSSR & SSSR_TNF_MSK) != SSSR_TNF_MSK && --timeout);
+ while (!(SSSR_P1 & SSSR_TNF) && --timeout);
if (timeout == 0) {
- printk("%s: warning: timeout while waiting for SSSR_TNF_MSK\n", __FUNCTION__);
+ printk("%s: warning: timeout while waiting for SSSR_TNF\n", __FUNCTION__);
};
+ SSDR_P1 = data;
+
udelay(1);
timeout = 100000;
- while ((SSSR & SSSR_RNE_MSK) != SSSR_RNE_MSK && --timeout);
+ while (!(SSSR_P1 & SSSR_RNE) && --timeout);
if (timeout == 0) {
- printk("%s: warning: timeout while waiting for SSSR_RNE_MSK\n", __FUNCTION__);
+ printk("%s: warning: timeout while waiting for SSSR_RNE\n", __FUNCTION__);
};
- ret = (SSDR);
+ ret = SSDR_P1;
spin_unlock_irqrestore(&ads7846_ssp_lock, flags);
return ret;
}
@@ -68,6 +63,7 @@
static void ads7846_init_chip(void)
{
+ printk("%s\n", __FUNCTION__);
/* now to set up GPIOs... */
GPDR(GPIO23_SCLK) |= GPIO_bit(GPIO23_SCLK);
GPDR(GPIO24_SFRM) |= GPIO_bit(GPIO24_SFRM);
@@ -78,71 +74,64 @@
pxa_gpio_mode(GPIO25_STXD_MD);
pxa_gpio_mode(GPIO26_SRXD_MD);
- SSCR0 = 0;
- SSCR0 |= 0xB; /* 12 bits */
- SSCR0 |= SSCR0_National;
- SSCR0 |= 0x1100; /* 100 mhz */
+ SSCR0_P1 = 0;
+ pxa_set_cken(CKEN23_SSP1, 1);
+
+ SSCR0_P1 |= (7 << 0) /*SSCR0_DataSize(12)*/; /* 24 bits */
+ SSCR0_P1 |= SSCR0_Motorola /*SSCR0_National*/; /* Motorola SPI Interface */
+ SSCR0_P1 |= SSCR0_SerClkDiv(7); /* ~100 KHz */
+ SSCR0_P1 |= SSCR0_EDSS; /* Extended Data Size Select */
- SSCR1 = 0;
+ SSCR1_P1 = 0;
+ SSPSP_P1 = 0;
+ /* Clear the Status */
+ SSSR_P1 = SSSR_P1 & 0x00fcfffc;
- SSCR0 |= SSCR0_SSE;
+ SSCR0_P1 |= SSCR0_SSE;
}
-static int __init ads7846_ssp_probe(struct platform_device *dev)
+static int ads7846_ssp_probe(struct platform_device *dev)
{
+ printk("%s\n", __FUNCTION__);
ads7846_init_chip();
return 0;
}
static int ads7846_ssp_remove(struct platform_device *dev)
{
+ printk("%s\n", __FUNCTION__);
SSCR0 &= ~SSCR0_SSE;
+ pxa_set_cken(CKEN23_SSP1, 0);
return 0;
}
-#ifdef CONFIG_PM
-static int ads7846_ssp_suspend(struct platform_device *dev, pm_message_t state)
-{
- return 0;
-}
-
-static int ads7846_ssp_resume(struct platform_device *dev)
-{
- ads7846_init_chip();
- return 0;
-}
-#endif
-
static struct platform_driver ads7846_ssp_driver = {
+ .probe = ads7846_ssp_probe,
+ .remove = ads7846_ssp_remove,
.driver = {
.name = "ads7846-ssp",
},
- .probe = ads7846_ssp_probe,
- .remove = ads7846_ssp_remove,
-#ifdef CONFIG_PM
- .suspend = ads7846_ssp_suspend,
- .resume = ads7846_ssp_resume,
-#endif
};
-static int __init ads7846_ssp_init(void)
+static int ads7846_ssp_init(void)
{
- return platform_driver_register(&ads7846_ssp_driver);
+ printk(KERN_NOTICE "ADS7846/TSC2046 analogic/digital converter Driver\n");
+ return platform_driver_register(&ads7846_ssp_driver);
}
-static void __exit ads7846_ssp_exit(void)
+#ifdef MODULE
+static void ads7846_ssp_exit(void)
{
platform_driver_unregister(&ads7846_ssp_driver);
}
-#ifdef MODULE
-module_init(ads7846_ssp_init)
+
+module_init(ads7846_ssp_init);
+module_exit(ads7846_ssp_exit);
#else /* start early for dependencies */
subsys_initcall(ads7846_ssp_init);
#endif
-module_exit(ads7846_ssp_exit)
-
+MODULE_LICENSE("GPL");
MODULE_AUTHOR("Pawel Kolodziejski, Paul Sokolovsky");
MODULE_DESCRIPTION("ADS7846 SSP channel driver");
-MODULE_LICENSE("GPL");
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/include/asm-arm/arch-pxa/aximx50-gpio.h kernel26/include/asm-arm/arch-pxa/aximx50-gpio.h
--- kernel26_vanilla/include/asm-arm/arch-pxa/aximx50-gpio.h 2007-01-23 20:34:51.000000000 +0100
+++ kernel26/include/asm-arm/arch-pxa/aximx50-gpio.h 2007-01-30 23:35:39.989363649 +0100
@@ -1,10 +1,9 @@
/*
- * include/asm-arm/arch-pxa/hx4700-gpio.h
- * History:
+ * include/asm-arm/arch-pxa/aximx50-gpio.h
+ * History:
+ *
+ * 2007-01-25 Pierre Gaufillet Creation
*
- * 2004-12-10 Michael Opdenacker. Wrote down GPIO settings as identified by Jamey Hicks.
- * Reused the h2200-gpio.h file as a template.
- * 2005-06-
*/
#ifndef _X50_GPIO_H_
@@ -33,196 +32,11 @@
#define X50_IRQ(gpio) \
IRQ_GPIO(GPIO_NR_X50_ ## gpio)
-
-#define GPIO_NR_X50_KEY_ON 0
-#define GPIO_NR_X50_GP_RST_N 1
-
-#define GPIO_NR_X50_PWR_SCL 3
-#define GPIO_NR_X50_PWR_SDA 4
-#define GPIO_NR_X50_PWR_CAP0 5
-#define GPIO_NR_X50_PWR_CAP1 6
-#define GPIO_NR_X50_PWR_CAP2 7
-#define GPIO_NR_X50_PWR_CAP3 8
-#define GPIO_NR_X50_CLK_PIO_CPU_13MHz 9
-#define GPIO_NR_X50_CLK_TOUT_32KHz 10
-
-#define GPIO_NR_X50_EXT_POWER 11
-
-#define GPIO_NR_X50_SD_EXT_INT 12
-#define GPIO_NR_X50_ASIC3_EXT_INT 12
-#define GPIO_NR_X50_USB_DETECT 14
-#define GPIO_NR_X50_CS1_N 15
-#define GPIO_NR_X50_PWM_OUT0 16
-#define GPIO_NR_X50_PWM_OUT1 17
-
-#define GPIO_NR_X50_RDY 18
-#define GPIO_NR_X50_TOUCHPANEL_SPI_CLK 19
-#define GPIO_NR_X50_SDCS2_N 20
-#define GPIO_NR_X50_SDCS3_N 21
-
-#define GPIO_NR_X50_SPI_CLK 23
-#define GPIO_NR_X50_SPI_CS_N 24
-#define GPIO_NR_X50_SPI_DO 25
-#define GPIO_NR_X50_SPI_DI 26
-#define GPIO_NR_X50_CODEC_ON 27
-
-#define GPIO_NR_X50_I2S_BCK 28
-#define GPIO_NR_X50_I2S_DIN 29
-#define GPIO_NR_X50_I2S_DOUT 30
-#define GPIO_NR_X50_I2S_SYNC 31
-
-#define GPIO_NR_X50_MMCLK 32
-#define GPIO_NR_X50_CS5_N 33
-
-#define GPIO_NR_X50_COM_RXD 34
-#define GPIO_NR_X50_COM_CTS 35
-
-#define GPIO_NR_X50_CHARGE_EN_N 36
-
-#define GPIO_NR_X50_COM_DSR 37
-
-#define GPIO_NR_X50_COM_TXD 39
-#define GPIO_NR_X50_COM_DTR 40
-#define GPIO_NR_X50_COM_RTS 41
-
-#define GPIO_NR_X50_BT_RXD 42
-#define GPIO_NR_X50_BT_TXD 43
-#define GPIO_NR_X50_BT_UART_CTS 44
-#define GPIO_NR_X50_BT_UART_RTS 45
-
-#define GPIO_NR_X50_POE_N 48
-#define GPIO_NR_X50_PWE_N 49
-#define GPIO_NR_X50_PIOR_N 50
-#define GPIO_NR_X50_PIOW_N 51
-#define GPIO_NR_X50_DEV_LOCK 52
-
-#define GPIO_NR_X50_PCE2_N 54
-#define GPIO_NR_X50_PREG_N 55
-#define GPIO_NR_X50_PWAIT_N 56
-#define GPIO_NR_X50_PIOIS16_N 57
-#define GPIO_NR_X50_LCD_PC1 59
-#define GPIO_NR_X50_CF_RNB 60 /* HaRET: I 1 0 FE */
-#define GPIO_NR_X50_W3220_RESET_N 61
-#define GPIO_NR_X50_LCD_RESET_N 62
-#define GPIO_NR_X50_CPU_SS_RESET_N 63
-
-#define GPIO_NR_X50_TOUCHPANEL_PEN_PU 65
-#define GPIO_NR_X50_EUART_PS 67
-
-#define GPIO_NR_X50_LCD_SLIN1 70
-#define GPIO_NR_X50_ASIC3_RESET_N 71
-//#define GPIO_NR_X50_CHARGE_EN_N 72
-#define GPIO_NR_X50_LCD_UD_1 73
-
-#define GPIO_NR_X50_EARPHONE_DET_N 75
-#define GPIO_NR_X50_USB_PUEN 76
-
-
-#define GPIO_NR_X50_CS2_N 78
-#define GPIO_NR_X50_CS3_N 79
-#define GPIO_NR_X50_CS4_N 80
-#define GPIO_NR_X50_CPU_GP_RESET_N 81
-#define GPIO_NR_X50_EUART_RESET 82
-#define GPIO_NR_X50_WLAN_RESET_N 83
-
-#define GPIO_NR_X50_CF_EXT_INT 84
-
-#define GPIO_NR_X50_PCE1_N 85
-#define GPIO_NR_X50_TOUCHPANEL_SPI_DI 86
-#define GPIO_NR_X50_TOUCHPANEL_SPI_DO 87
-#define GPIO_NR_X50_TOUCHPANEL_SPI_CS_N 88
+/*********************************************************************/
+
+#define GPIO_NR_X50_PEN_IRQ_N 94 /* Input */
-#define GPIO_NR_X50_ACTION_BUTTON_N 90
-#define GPIO_NR_X50_SOMEOTHER_BUTTON_N 91
-
-//#define GPIO_NR_X50_FLASH_VPEN 91
-#define GPIO_NR_X50_HP_DRIVER 92
-#define GPIO_NR_X50_EUART_INT 93
-#define GPIO_NR_X50_TOUCHPANEL_IRQ_N 94
-#define GPIO_NR_X50_BATT_OFF 95
-#define GPIO_NR_X50_USB_CHARGE_RATE 96
-//#define GPIO_NR_X50_BL_DETECT_N 97
-#define GPIO_NR_X50_RIGHT_BUTTON_N 97 //
-#define GPIO_NR_X50_LEFT_BUTTON_N 98 //
-#define GPIO_NR_X50_UP_BUTTON_N 100
-#define GPIO_NR_X50_DOWN_BUTTON_N 101
-
-#define GPIO_NR_X50_KEY_AP1 99
-#define GPIO_JOY_DIR (GPLR2 & 15)
-
-#define GPIO_NR_X50_AUTO_SENSE 100 /* to backlight circuit */
-
-#define GPIO_NR_X50_SYNAPTICS_POWER_ON 102
-//#define GPIO_NR_X50_SYNAPTICS_INT 103
-#define GPIO_NR_X50_KEYOUT1_N 103
-#define GPIO_NR_X50_PSKTSEL 104
-//#define GPIO_NR_X50_IR_ON_N 105
-#define GPIO_NR_X50_KEYOUT2_N 105
-#define GPIO_NR_X50_CPU_BT_RESET_N 106
-#define GPIO_NR_X50_SPK_SD_N 107
-
-#define GPIO_NR_X50_CODEC_ON_N 109
-#define GPIO_NR_X50_LCD_LVDD_3V3_ON 110
-#define GPIO_NR_X50_LCD_AVDD_3V3_ON 111
-#define GPIO_NR_X50_LCD_N2V7_7V3_ON 112
-#define GPIO_NR_X50_I2S_SYSCLK 113
-#define GPIO_NR_X50_CF_RESET 114 /* HaRET: O 0 0 */
-#define GPIO_NR_X50_USB2_DREQ 115
-#define GPIO_NR_X50_CPU_HW_RESET_N 116
-#define GPIO_NR_X50_I2C_SCL 117
-#define GPIO_NR_X50_I2C_SDA 118
-
-#define EGPIO0_VCC_3V3_EN (1<<0) /* what use? */
-#define EGPIO1_WL_VREG_EN (1<<1) /* WLAN Power */
-#define EGPIO2_VCC_2V1_WL_EN (1<<2) /* unused */
-#define EGPIO3_SS_PWR_ON (1<<3) /* smart slot power on */
-#define EGPIO4_CF_3V3_ON (1<<4) /* CF 3.3V enable */
-#define EGPIO5_BT_3V3_ON (1<<5) /* Bluetooth 3.3V enable */
-#define EGPIO6_WL1V8_EN (1<<6) /* WLAN 1.8V enable */
-#define EGPIO7_VCC_3V3_WL_EN (1<<7) /* WLAN 3.3V enable */
-#define EGPIO8_USB_3V3_ON (1<<8) /* unused */
-
-#define GPIO_NR_X50_SDCS2_N_MD (20 | GPIO_ALT_FN_1_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_SDCS3_N_MD (21 | GPIO_ALT_FN_1_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_SYNAPTICS_SPI_CLK_MD (23 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_X50_SYNAPTICS_SPI_CS_N_MD (24 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_X50_SYNAPTICS_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_X50_SYNAPTICS_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_X50_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_X50_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN)
-#define GPIO_NR_X50_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_X50_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_X50_COM_RXD_MD (34 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_X50_COM_CTS_MD (35 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_X50_COM_DCD_MD (36 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_X50_COM_DSR_MD (37 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_X50_COM_RING_MD (38 | GPIO_ALT_FN_1_IN)
-#define GPIO_NR_X50_COM_TXD_MD (39 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_X50_COM_DTR_MD (40 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_X50_COM_RTS_MD (41 | GPIO_ALT_FN_2_OUT)
-#define GPIO_NR_X50_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PIOR_N_MD (50 | GPIO_ALT_FN_2_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PIOW_N_MD (51 | GPIO_ALT_FN_2_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PCE2_N_MD (54 | GPIO_ALT_FN_2_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PREG_N_MD (55 | GPIO_ALT_FN_2_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PWAIT_N_MD (56 | GPIO_ALT_FN_1_IN | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PIOIS16_N_MD (57 | GPIO_ALT_FN_1_IN | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PCE1_N_MD (85 | GPIO_ALT_FN_1_OUT | GPIO_ACTIVE_LOW)
-#define GPIO_NR_X50_PSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT)
-#define GPIO_NR_X50_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT)
-
-void x50_egpio_enable( unsigned long bits );
-void x50_egpio_disable( unsigned long bits );
-
-
-extern unsigned long aximx50_ssp_ads7846_putget(unsigned long);
-extern unsigned long aximx50_ssp_ads7846_get(void);
-extern void aximx50_ssp_ads7846_put(ulong data);
-extern void aximx50_ssp_ads7846_lock(void);
-extern void aximx50_ssp_ads7846_unlock(void);
-
#endif /* _X50_GPIO_H */
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/include/linux/spi/ads7846_ssp.h kernel26/include/linux/spi/ads7846_ssp.h
--- kernel26_vanilla/include/linux/spi/ads7846_ssp.h 1970-01-01 01:00:00.000000000 +0100
+++ kernel26/include/linux/spi/ads7846_ssp.h 2007-02-02 22:21:50.918546728 +0100
@@ -0,0 +1,3 @@
+/* linux/spi/ads7846_ssp.h */
+
+extern u32 ads7846_ssp_putget(u32 data);
diff -rNu -x CVS -x .project -x .cdtproject -x .settings -x debian kernel26_vanilla/include/linux/spi/ads7846ts_ssp.h kernel26/include/linux/spi/ads7846ts_ssp.h
--- kernel26_vanilla/include/linux/spi/ads7846ts_ssp.h 2007-01-27 01:14:59.000000000 +0100
+++ kernel26/include/linux/spi/ads7846ts_ssp.h 2007-02-02 22:34:37.433966537 +0100
@@ -2,4 +2,5 @@
driver, ads7846ts_ssp. */
struct ads7846ts_ssp_platform_data {
int irq;
+ int gpio;
};
--
_______________________________________________
Aximx50-port mailing list
[email protected]
https://www.handhelds.org/mailman/listinfo/aximx50-port