From: <hap...@us...> - 2007-09-17 13:00:32
|
Revision: 1323 http://hackndev.svn.sourceforge.net/hackndev/?rev=1323&view=rev Author: happy-slapin Date: 2007-09-17 06:00:29 -0700 (Mon, 17 Sep 2007) Log Message: ----------- cleanup: removed unrelated junk Modified Paths: -------------- linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Kconfig linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Makefile linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Kconfig linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Makefile linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/i2c-core.c linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-asic.h linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-gpio.h linux4palm/linux/branches/cleanup-branch-never-commit/include/linux/mfd/htc-egpio.h Modified: linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Kconfig =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Kconfig 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Kconfig 2007-09-17 13:00:29 UTC (rev 1323) @@ -42,17 +42,6 @@ tristate "MPC8xx CPM I2C interface" depends on 8xx && I2C -config I2C_ALGOPXA - tristate "PXA I2C Algorithm" - depends on ARCH_PXA && I2C - help - This supports the use of the PXA I2C interface found on XScale - processors. Say Y if you have one of these. You should also say Y - for the PXA I2C peripheral driver support below. - - This support is also available as a module. If so, the module - will be called i2c-algo-pxa. - config I2C_ALGO_SGI tristate "I2C SGI interfaces" depends on I2C && (SGI_IP22 || SGI_IP32 || X86_VISWS) Modified: linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Makefile =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Makefile 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/algos/Makefile 2007-09-17 13:00:29 UTC (rev 1323) @@ -6,7 +6,6 @@ obj-$(CONFIG_I2C_ALGOPCF) += i2c-algo-pcf.o obj-$(CONFIG_I2C_ALGOPCA) += i2c-algo-pca.o obj-$(CONFIG_I2C_ALGO_SGI) += i2c-algo-sgi.o -obj-$(CONFIG_I2C_PXA) += i2c-algo-pxa.o ifeq ($(CONFIG_I2C_DEBUG_ALGO),y) EXTRA_CFLAGS += -DDEBUG Modified: linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Kconfig =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Kconfig 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Kconfig 2007-09-17 13:00:29 UTC (rev 1323) @@ -36,12 +36,6 @@ This driver can also be built as a module. If so, the module will be called eeprom. -config I2C_ADCM2650 - tristate "ADCM2650 device" - depends on I2C && EXPERIMENTAL - help - If you say yes here you get support for the ADCM 2650 chip. - config SENSORS_PCF8574 tristate "Philips PCF8574 and PCF8574A" depends on I2C && EXPERIMENTAL @@ -115,7 +109,7 @@ # and having mostly OMAP-specific board support config TPS65010 tristate "TPS6501x Power Management chips" - depends on I2C && (ARCH_OMAP || MACH_T3XSCALE) + depends on I2C && ARCH_OMAP default y if MACH_OMAP_H2 || MACH_OMAP_H3 || MACH_OMAP_OSK help If you say yes here you get support for the TPS6501x series of @@ -158,17 +152,4 @@ This driver can also be built as a module. If so, the module will be called max6875. -config I2C_OV9640 - tristate "Support for OmniVision 9640 camera sensor" - depends on I2C - help - Say yes here to enable OV9640 sensor which is found in some - handhelds and phones - -config I2C_OV96XX - tristate "Support for OmniVision 96XX camera sensor" - depends on I2C - help - Say yes here to enable OV96XX sensor which is found in some - handhelds and phones endmenu Modified: linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Makefile =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Makefile 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/chips/Makefile 2007-09-17 13:00:29 UTC (rev 1323) @@ -15,12 +15,6 @@ obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o obj-$(CONFIG_TPS65010) += tps65010.o -obj-$(CONFIG_I2C_ADCM2650) += adcm2650-i2c.o - -obj-$(CONFIG_I2C_OV9640) += i2c-ov9640.o - -obj-$(CONFIG_I2C_OV96XX) += i2c-ov96xx.o - ifeq ($(CONFIG_I2C_DEBUG_CHIP),y) EXTRA_CFLAGS += -DDEBUG endif Modified: linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/i2c-core.c =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/i2c-core.c 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/drivers/i2c/i2c-core.c 2007-09-17 13:00:29 UTC (rev 1323) @@ -34,8 +34,8 @@ #include <linux/mutex.h> #include <linux/completion.h> #include <asm/uaccess.h> -#include <linux/delay.h> + static LIST_HEAD(adapters); static LIST_HEAD(drivers); static DEFINE_MUTEX(core_lists); @@ -663,7 +663,7 @@ msg.addr = client->addr; msg.flags = client->flags & I2C_M_TEN; msg.len = count; - msg.buf = (char *) buf; + msg.buf = (char *)buf; ret = i2c_transfer(adap, &msg, 1); Modified: linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-asic.h =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-asic.h 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-asic.h 2007-09-17 13:00:29 UTC (rev 1323) @@ -24,44 +24,45 @@ /* ASIC3 GPIO A bank */ -#define GPIOA_I2C_PWR_ON 0 /* Output */ /* lkcl: guess!! */ -#define GPIOA_CODEC_ON 1 /* Output */ /* ak4641 codec on */ -#define GPIOA_HEADPHONE_PWR_ON 3 /* Output */ /* headphone power-on? */ -#define GPIOA_SPKMIC_PWR2_ON 6 /* Output */ /* speaker power-on */ -#define GPIOA_USB_PUEN 7 /* Output */ -#define GPIOA_LCD_PWR_5 15 /* Output */ +#define GPIOA_I2C_PWR_ON 0 /* Output */ /* lkcl: guess!! */ +#define GPIOA_CODEC_ON 1 /* Output */ /* ak4641 codec on */ +#define GPIOA_HEADPHONE_PWR_ON 3 /* Output */ /* headphone power-on? */ +#define GPIOA_SPKMIC_PWR2_ON 6 /* Output */ /* speaker power-on */ +#define GPIOA_USB_PUEN 7 /* Output */ +#define GPIOA_LCD_PWR_5 15 /* Output */ /* ASIC3 GPIO B bank */ -#define GPIOB_GSM_DCD 0 /* Input */ /* phone-related: not sure of name or purpose */ -#define GPIOB_BB_READY 2 /* Input */ /* phone-related: not sure of name or purpose */ -#define GPIOB_ACX_IRQ_N 5 /* Input */ /* acx wifi irq ? */ -#define GPIOB_USB_DETECT 6 /* Input */ -#define GPIOB_HEADPHONE 9 /* Input */ /* lkcl: guess!!! */ -#define GPIOB_CODEC_RESET 10 /* Output */ /* think this is right... */ -#define GPIOB_ACX_PWR_1 15 /* Output */ /* acx wifi power 1 */ +#define GPIOB_GSM_DCD 0 /* Input */ /* phone-related: not sure of name or purpose */ +#define GPIOB_BB_READY 2 /* Input */ /* phone-related: not sure of name or purpose */ +#define GPIOB_ACX_IRQ_N 5 /* Input */ /* acx wifi irq ? */ +#define GPIOB_USB_DETECT 6 /* Input */ +#define GPIOB_HEADPHONE 9 /* Input */ /* lkcl: guess!!! */ +#define GPIOB_CODEC_RESET 10 /* Output */ /* think this is right... */ +#define GPIOB_ACX_PWR_1 15 /* Output */ /* acx wifi power 1 */ /* ASIC3 GPIO C bank */ -#define GPIOC_BT_RESET 7 /* Output */ -#define GPIOC_ACX_RESET 8 /* Output */ /* acx wifi reset */ -#define GPIOC_PHONE_4 12 /* Output */ /* phone-related: not sure of name or purpose */ -#define GPIOC_PHONE_5 13 /* Output */ /* phone-related: not sure of name or purpose */ -#define GPIOC_LCD_PWR_1 9 /* Output */ -#define GPIOC_LCD_PWR_2 10 /* Output */ -#define GPIOC_ACX_PWR_3 15 /* Output */ /* acx wifi power 3 */ +#define GPIOC_BT_RESET 7 /* Output */ +#define GPIOC_PHONE_4 12 /* Output */ /* phone-related: not sure of name or purpose */ +#define GPIOC_ACX_RESET 8 /* Output */ /* acx wifi reset */ +#define GPIOC_PHONE_5 13 /* Output */ /* phone-related: not sure of name or purpose */ +#define GPIOC_LCD_PWR_1 9 /* Output */ +#define GPIOC_LCD_PWR_2 10 /* Output */ +#define GPIOC_ACX_PWR_3 15 /* Output */ /* acx wifi power 3 */ /* ASIC3 GPIO D bank */ -#define GPIOD_BT_PWR_ON 6 /* Output */ -#define GPIOD_ACX_PWR_2 3 /* Output */ /* acx wifi power 2 */ -#define GPIOD_PHONE_1 4 /* Output */ /* phone-related: not sure of name or purpose */ -#define GPIOD_PHONE_2 8 /* Output */ /* phone-related: not sure of name or purpose */ -#define GPIOD_PHONE_6 5 /* Output */ /* phone-related: not sure of name or purpose */ -#define GPIOD_VIBRATE 10 /* Output */ /* vibrate */ -#define GPIOD_LCD_BACKLIGHT 12 /* Output */ +#define GPIOD_BT_PWR_ON 6 /* Output */ +#define GPIOD_PHONE_1 4 /* Output */ /* phone-related: not sure of name or purpose */ +#define GPIOD_ACX_PWR_2 3 /* Output */ /* acx wifi power 2 */ +#define GPIOD_PHONE_6 5 /* Output */ /* phone-related: not sure of name or purpose */ +#define GPIOD_PHONE_2 8 /* Output */ /* phone-related: not sure of name or purpose */ +#define GPIOD_VIBRATE 10 /* Output */ /* vibrate */ +#define GPIOD_LCD_BACKLIGHT 12 /* Output */ extern struct platform_device htcsable_asic3; #endif /* _HTCSABLE_ASIC_H_ */ + Modified: linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-gpio.h =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-gpio.h 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/include/asm-arm/arch-pxa/htcsable-gpio.h 2007-09-17 13:00:29 UTC (rev 1323) @@ -11,69 +11,93 @@ #include <asm/arch/pxa-regs.h> -/* Misc defines */ -#define GPIO_NR_HTCSABLE_KEY_ON_N 0 -#define GPIO_NR_HTCSABLE_GP_RST_N 1 +#define GET_HTCSABLE_GPIO(gpio) \ + (GPLR(GPIO_NR_HTCSABLE_ ## gpio) & GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio)) -#define GPIO_NR_HTCSABLE_ASIC3_EXT_INT 9 -#define GPIO_NR_HTCSABLE_ASIC3_SDIO_INT_N 13 +#define SET_HTCSABLE_GPIO(gpio, setp) \ +do { \ +if (setp) \ + GPSR(GPIO_NR_HTCSABLE_ ## gpio) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio); \ +else \ + GPCR(GPIO_NR_HTCSABLE_ ## gpio) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio); \ +} while (0) -#define EGPIO6_BT_3V3_ON (1<<6) /* Bluetooth 3.3V enable */ -#define GPIO_NR_HTCSABLE_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH) -#define GPIO_NR_HTCSABLE_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH) +#define SET_HTCSABLE_GPIO_N(gpio, setp) \ +do { \ +if (setp) \ + GPCR(GPIO_NR_HTCSABLE_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio ## _N); \ +else \ + GPSR(GPIO_NR_HTCSABLE_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio ## _N); \ +} while (0) -#define GPIO_NR_HTCSABLE_ACX 111 -#define GPIO_NR_HTCSABLE_PWM1OUT_MD (115 | GPIO_ALT_FN_3_OUT) +#define HTCSABLE_IRQ(gpio) \ + IRQ_GPIO(GPIO_NR_HTCSABLE_ ## gpio) + +#define GPIO_NR_HTCSABLE_KEY_ON_N 0 +#define GPIO_NR_HTCSABLE_GP_RST_N 1 -/* nope - this should be STUART! -#define GPIO_NR_HTCSABLE_COM_RXD_MD (34 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_COM_CTS_MD (35 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_COM_TXD_MD (39 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_COM_RTS_MD (41 | GPIO_ALT_FN_2_OUT) -*/ +#define GPIO_NR_HTCSABLE_PHONE_3 11 /* phone-related output */ -/* Touchscreen */ -#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_CLK_MD (23 | GPIO_ALT_FN_2_IN) -#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_CS_N_MD (24 | GPIO_ALT_FN_2_IN) -#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_ASIC3_EXT_INT 9 +#define GPIO_NR_HTCSABLE_ASIC3_SDIO_INT_N 13 + +#define GPIO_NR_HTCSABLE_I2S_BCK 28 +#define GPIO_NR_HTCSABLE_I2S_DIN 29 +#define GPIO_NR_HTCSABLE_I2S_DOUT 30 +#define GPIO_NR_HTCSABLE_I2S_SYNC 31 + +#define GPIO_NR_HTCSABLE_I2S_SYSCLK 113 #define GPIO_NR_HTCSABLE_TOUCHPANEL_IRQ_N 115 -/* I2S - sound */ -#define GPIO_NR_HTCSABLE_I2S_BCK 28 -#define GPIO_NR_HTCSABLE_I2S_DIN 29 -#define GPIO_NR_HTCSABLE_I2S_DOUT 30 -#define GPIO_NR_HTCSABLE_I2S_SYNC 31 -#define GPIO_NR_HTCSABLE_I2S_SYSCLK 113 +#define EGPIO6_BT_3V3_ON (1<<6) /* Bluetooth 3.3V enable */ -#define GPIO_NR_HTCSABLE_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT) -#define GPIO_NR_HTCSABLE_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN) -#define GPIO_NR_HTCSABLE_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT) -#define GPIO_NR_HTCSABLE_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT) -#define GPIO_NR_HTCSABLE_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) +/* TODO: should be checked */ -/* UART */ -#define GPIO_NR_HTCSABLE_STD_RXD_MD (46 | GPIO_ALT_FN_2_IN) -#define GPIO_NR_HTCSABLE_STD_TXD_MD (47 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_CLK_MD (23 | GPIO_ALT_FN_2_IN) +#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_CS_N_MD (24 | GPIO_ALT_FN_2_IN) +#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_DO_MD (25 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_TOUCHSCREEN_SPI_DI_MD (26 | GPIO_ALT_FN_1_IN) -/* Phone */ -#define GPIO_NR_HTCSABLE_PHONE_3 11 /* phone-related output */ -#define GPIO_NR_HTCSABLE_PHONE_RXD_MD (42 | GPIO_ALT_FN_1_IN) /* BTUART */ +#define GPIO_NR_HTCSABLE_I2S_BCK_MD (28 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_HTCSABLE_I2S_DIN_MD (29 | GPIO_ALT_FN_2_IN) +#define GPIO_NR_HTCSABLE_I2S_DOUT_MD (30 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_HTCSABLE_I2S_SYNC_MD (31 | GPIO_ALT_FN_1_OUT) + +/* nope - this should be STUART! +#define GPIO_NR_HTCSABLE_COM_RXD_MD (34 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_COM_CTS_MD (35 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_COM_TXD_MD (39 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_COM_RTS_MD (41 | GPIO_ALT_FN_2_OUT) +*/ + +#define GPIO_NR_HTCSABLE_PHONE_RXD_MD (42 | GPIO_ALT_FN_1_IN) /* BTUART */ #define GPIO_NR_HTCSABLE_PHONE_TXD_MD (43 | GPIO_ALT_FN_2_OUT) /* BTUART */ -#define GPIO_NR_HTCSABLE_PHONE_UART_CTS_MD (44 | GPIO_ALT_FN_1_IN) /* BTUART */ -#define GPIO_NR_HTCSABLE_PHONE_UART_RTS_MD (45 | GPIO_ALT_FN_2_OUT) /* BTUART */ +#define GPIO_NR_HTCSABLE_PHONE_UART_CTS_MD (44 | GPIO_ALT_FN_1_IN) /* BTUART */ +#define GPIO_NR_HTCSABLE_PHONE_UART_RTS_MD (45 | GPIO_ALT_FN_2_OUT) /* BTUART */ -/* Bluetooth */ -#define GPIO_NR_HTCSABLE_BT_RXD_MD (34 | GPIO_ALT_FN_1_IN) /* FFUART */ +#define GPIO_NR_HTCSABLE_BT_RXD_MD (34 | GPIO_ALT_FN_1_IN) /* FFUART */ #define GPIO_NR_HTCSABLE_BT_TXD_MD (39 | GPIO_ALT_FN_2_OUT) /* FFUART */ -#define GPIO_NR_HTCSABLE_BT_UART_CTS_MD (35 | GPIO_ALT_FN_1_IN) /* FFUART */ +#define GPIO_NR_HTCSABLE_BT_UART_CTS_MD (35 | GPIO_ALT_FN_1_IN) /* FFUART */ #define GPIO_NR_HTCSABLE_BT_UART_RTS_MD (41 | GPIO_ALT_FN_2_OUT) /* FFUART */ -/* I2C */ -#define GPIO_NR_HTCSABLE_I2C_SCL_MD (117 | GPIO_ALT_FN_1_OUT) -#define GPIO_NR_HTCSABLE_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_HTCSABLE_STD_RXD_MD (46 | GPIO_ALT_FN_2_IN) +#define GPIO_NR_HTCSABLE_STD_TXD_MD (47 | GPIO_ALT_FN_1_OUT) -/* Keyboard */ +#define GPIO_NR_HTCSABLE_POE_N_MD (48 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH) +#define GPIO_NR_HTCSABLE_PWE_N_MD (49 | GPIO_ALT_FN_2_OUT | GPIO_DFLT_HIGH) + +#define GPIO_NR_HTCSABLE_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) + +#define GPIO_NR_HTCSABLE_ACX (111) +#define GPIO_NR_HTCSABLE_PWM1OUT_MD (115 | GPIO_ALT_FN_3_OUT) + +#define GPIO_NR_HTCSABLE_I2C_SCL_MD (117 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_HTCSABLE_I2C_SDA_MD (118 | GPIO_ALT_FN_1_OUT) + +/**************************************************************** + * Pull out keyboard + ****************************************************************/ + #define GPIO_NR_HTCSABLE_KP_MKIN0 100 #define GPIO_NR_HTCSABLE_KP_MKIN1 101 #define GPIO_NR_HTCSABLE_KP_MKIN2 102 @@ -92,45 +116,21 @@ #define GPIO_NR_HTCSABLE_KP_MKOUT6 40 #define GPIO_NR_HTCSABLE_KP_MKOUT7 22 -#define GPIO_NR_HTCSABLE_KP_MKIN0_MD (GPIO_NR_HTCSABLE_KP_MKIN0 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN1_MD (GPIO_NR_HTCSABLE_KP_MKIN1 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN2_MD (GPIO_NR_HTCSABLE_KP_MKIN2 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN3_MD (GPIO_NR_HTCSABLE_KP_MKIN3 | GPIO_ALT_FN_3_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN4_MD (GPIO_NR_HTCSABLE_KP_MKIN4 | GPIO_ALT_FN_2_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN5_MD (GPIO_NR_HTCSABLE_KP_MKIN5 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN6_MD (GPIO_NR_HTCSABLE_KP_MKIN6 | GPIO_ALT_FN_1_IN) -#define GPIO_NR_HTCSABLE_KP_MKIN7_MD (GPIO_NR_HTCSABLE_KP_MKIN7 | GPIO_ALT_FN_3_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN0_MD (GPIO_NR_HTCSABLE_KP_MKIN0 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN1_MD (GPIO_NR_HTCSABLE_KP_MKIN1 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN2_MD (GPIO_NR_HTCSABLE_KP_MKIN2 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN3_MD (GPIO_NR_HTCSABLE_KP_MKIN3 | GPIO_ALT_FN_3_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN4_MD (GPIO_NR_HTCSABLE_KP_MKIN4 | GPIO_ALT_FN_2_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN5_MD (GPIO_NR_HTCSABLE_KP_MKIN5 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN6_MD (GPIO_NR_HTCSABLE_KP_MKIN6 | GPIO_ALT_FN_1_IN) +#define GPIO_NR_HTCSABLE_KP_MKIN7_MD (GPIO_NR_HTCSABLE_KP_MKIN7 | GPIO_ALT_FN_3_IN) -#define GPIO_NR_HTCSABLE_KP_MKOUT0_MD (GPIO_NR_HTCSABLE_KP_MKOUT0 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT1_MD (GPIO_NR_HTCSABLE_KP_MKOUT1 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT2_MD (GPIO_NR_HTCSABLE_KP_MKOUT2 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT3_MD (GPIO_NR_HTCSABLE_KP_MKOUT3 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT4_MD (GPIO_NR_HTCSABLE_KP_MKOUT4 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT5_MD (GPIO_NR_HTCSABLE_KP_MKOUT5 | GPIO_ALT_FN_2_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT6_MD (GPIO_NR_HTCSABLE_KP_MKOUT6 | GPIO_ALT_FN_1_OUT) -#define GPIO_NR_HTCSABLE_KP_MKOUT7_MD (GPIO_NR_HTCSABLE_KP_MKOUT7 | GPIO_ALT_FN_1_OUT) - -/* Macros */ -#define GET_HTCSABLE_GPIO(gpio) \ - (GPLR(GPIO_NR_HTCSABLE_ ## gpio) & GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio)) - -#define SET_HTCSABLE_GPIO(gpio, setp) \ -do { \ -if (setp) \ - GPSR(GPIO_NR_HTCSABLE_ ## gpio) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio); \ -else \ - GPCR(GPIO_NR_HTCSABLE_ ## gpio) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio); \ -} while (0) - -#define SET_HTCSABLE_GPIO_N(gpio, setp) \ -do { \ -if (setp) \ - GPCR(GPIO_NR_HTCSABLE_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio ## _N); \ -else \ - GPSR(GPIO_NR_HTCSABLE_ ## gpio ## _N) = GPIO_bit(GPIO_NR_HTCSABLE_ ## gpio ## _N); \ -} while (0) - -#define HTCSABLE_IRQ(gpio) \ - IRQ_GPIO(GPIO_NR_HTCSABLE_ ## gpio) - +#define GPIO_NR_HTCSABLE_KP_MKOUT0_MD (GPIO_NR_HTCSABLE_KP_MKOUT0 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT1_MD (GPIO_NR_HTCSABLE_KP_MKOUT1 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT2_MD (GPIO_NR_HTCSABLE_KP_MKOUT2 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT3_MD (GPIO_NR_HTCSABLE_KP_MKOUT3 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT4_MD (GPIO_NR_HTCSABLE_KP_MKOUT4 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT5_MD (GPIO_NR_HTCSABLE_KP_MKOUT5 | GPIO_ALT_FN_2_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT6_MD (GPIO_NR_HTCSABLE_KP_MKOUT6 | GPIO_ALT_FN_1_OUT) +#define GPIO_NR_HTCSABLE_KP_MKOUT7_MD (GPIO_NR_HTCSABLE_KP_MKOUT7 | GPIO_ALT_FN_1_OUT) #endif /* _HTCSABLE_GPIO_H */ Modified: linux4palm/linux/branches/cleanup-branch-never-commit/include/linux/mfd/htc-egpio.h =================================================================== --- linux4palm/linux/branches/cleanup-branch-never-commit/include/linux/mfd/htc-egpio.h 2007-09-17 12:14:36 UTC (rev 1322) +++ linux4palm/linux/branches/cleanup-branch-never-commit/include/linux/mfd/htc-egpio.h 2007-09-17 13:00:29 UTC (rev 1323) @@ -5,8 +5,6 @@ #ifndef __HTC_EGPIO_H__ #define __HTC_EGPIO_H__ -#include <linux/gpiodev.h> /* struct gpiodev_ops */ - enum { /* Maximum number of 16 bit registers a chip may have. */ MAX_EGPIO_REGS = 8, @@ -18,18 +16,15 @@ enum { /* This pin corresponds to an input gpio */ HTC_EGPIO_TYPE_INPUT, - /* This pin corresponds to an irq that does not have an - * associated input gpio */ - HTC_EGPIO_TYPE_IRQ, /* This pin corresponds to an output gpio */ HTC_EGPIO_TYPE_OUTPUT, }; /* Information on each pin on the chip. */ struct htc_egpio_pinInfo { - /* The bit offset of the pin (eg, 18 is the third bit of the - * second register). */ - int pin_nr; + /* The gpio id of the pin (eg, gpio_base+18 is the third bit + * of the second register). */ + int gpio; /* The type - input, irq, output */ int type; /* For output pins - the poweron default */ @@ -40,8 +35,6 @@ /* Platform data description provided by the arch */ struct htc_egpio_platform_data { - /* This is 'gpiodev' capable */ - struct gpiodev_ops ops; /* Beginning of available irqs (eg, IRQ_BOARD_START) */ int irq_base; /* Beginning of available gpios (eg, GPIO_BASE_INCREMENT) */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |