diff options
author | mokopatches <mokopatches@openmoko.org> | 2008-11-19 17:03:18 +0000 |
---|---|---|
committer | warmcat <andy@warmcat.com> | 2008-11-19 17:03:18 +0000 |
commit | ed36a6e47e095f266031f6fb532d1098b4bf42dc (patch) | |
tree | e65f8e929d2e563174fd998751a06cf6ad830d09 /include/asm-arm | |
parent | 4be3b6cddde0dbf2d66493466f00a1ea930bdfaf (diff) |
fiq-hdq.patch
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-s3c2410/fiq_ipc_gta02.h | 23 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/gta02.h | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-arm/arch-s3c2410/fiq_ipc_gta02.h b/include/asm-arm/arch-s3c2410/fiq_ipc_gta02.h index 507d23556b2..c5eb3df47cf 100644 --- a/include/asm-arm/arch-s3c2410/fiq_ipc_gta02.h +++ b/include/asm-arm/arch-s3c2410/fiq_ipc_gta02.h @@ -19,12 +19,35 @@ #include <asm/arch/pwm.h> #include <asm/plat-s3c/regs-timer.h> +enum hdq_bitbang_states { + HDQB_IDLE = 0, + HDQB_TX_BREAK, + HDQB_TX_BREAK_RECOVERY, + HDQB_ADS_CALC, + HDQB_ADS_LOW, + HDQB_ADS_HIGH, + HDQB_WAIT_RX, + HDQB_DATA_RX_LOW, + HDQB_DATA_RX_HIGH, + HDQB_WAIT_TX, +}; struct fiq_ipc { /* vibrator */ unsigned long vib_gpio_pin; /* which pin to meddle with */ u8 vib_pwm; /* 0 = OFF -- will ensure GPIO deasserted and stop FIQ */ u8 vib_pwm_latched; + + /* hdq */ + u8 hdq_probed; /* nonzero after HDQ driver probed */ + struct mutex hdq_lock; /* if you want to use hdq, you have to take lock */ + unsigned long hdq_gpio_pin; /* GTA02 = GPD14 which pin to meddle with */ + u8 hdq_ads; /* b7..b6 = register address, b0 = r/w */ + u8 hdq_tx_data; /* data to tx for write action */ + u8 hdq_rx_data; /* data received in read action */ + u8 hdq_request_ctr; /* incremented by "user" to request a transfer */ + u8 hdq_transaction_ctr; /* incremented after each transfer */ + u8 hdq_error; /* 0 = no error */ }; /* actual definition lives in arch/arm/mach-s3c2440/fiq_c_isr.c */ diff --git a/include/asm-arm/arch-s3c2410/gta02.h b/include/asm-arm/arch-s3c2410/gta02.h index fa49d932673..f686a7a20d3 100644 --- a/include/asm-arm/arch-s3c2410/gta02.h +++ b/include/asm-arm/arch-s3c2410/gta02.h @@ -37,6 +37,7 @@ #define GTA02v3_GPIO_nG1_CS S3C2410_GPD12 /* v3 + v4 only */ #define GTA02v3_GPIO_nG2_CS S3C2410_GPD13 /* v3 + v4 only */ +#define GTA02v5_GPIO_HDQ S3C2410_GPD14 /* v5 + */ #define GTA02_GPIO_nG1_INT S3C2410_GPF0 #define GTA02_GPIO_IO1 S3C2410_GPF1 |