Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: at91/boards: use -EINVAL for invalid gpio

this will allow to use gpio_is_valid

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>

authored by

Jean-Christophe PLAGNIOL-VILLARD and committed by
Arnd Bergmann
63b4c296 1a2d9156

+192 -65
+2
arch/arm/mach-at91/board-1arm.c
··· 70 70 71 71 static struct at91_usbh_data __initdata onearm_usbh_data = { 72 72 .ports = 1, 73 + .vbus_pin = {-EINVAL, -EINVAL}, 74 + .overcurrent_pin= {-EINVAL, -EINVAL}, 73 75 }; 74 76 75 77 static struct at91_udc_data __initdata onearm_udc_data = {
+7 -1
arch/arm/mach-at91/board-afeb-9260v1.c
··· 75 75 */ 76 76 static struct at91_usbh_data __initdata afeb9260_usbh_data = { 77 77 .ports = 1, 78 + .vbus_pin = {-EINVAL, -EINVAL}, 79 + .overcurrent_pin= {-EINVAL, -EINVAL}, 78 80 }; 79 81 80 82 /* ··· 84 82 */ 85 83 static struct at91_udc_data __initdata afeb9260_udc_data = { 86 84 .vbus_pin = AT91_PIN_PC5, 87 - .pullup_pin = 0, /* pull-up driven by UDC */ 85 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 88 86 }; 89 87 90 88 ··· 140 138 .bus_width_16 = 0, 141 139 .parts = afeb9260_nand_partition, 142 140 .num_parts = ARRAY_SIZE(afeb9260_nand_partition), 141 + .det_pin = -EINVAL, 143 142 }; 144 143 145 144 ··· 152 149 .wp_pin = AT91_PIN_PC4, 153 150 .slot_b = 1, 154 151 .wire4 = 1, 152 + .vcc_pin = -EINVAL, 155 153 }; 156 154 157 155 ··· 173 169 static struct at91_cf_data afeb9260_cf_data = { 174 170 .chipselect = 4, 175 171 .irq_pin = AT91_PIN_PA6, 172 + .det_pin = -EINVAL, 173 + .vcc_pin = -EINVAL, 176 174 .rst_pin = AT91_PIN_PA7, 177 175 .flags = AT91_CF_TRUE_IDE, 178 176 };
+3 -1
arch/arm/mach-at91/board-cam60.c
··· 62 62 */ 63 63 static struct at91_usbh_data __initdata cam60_usbh_data = { 64 64 .ports = 1, 65 + .vbus_pin = {-EINVAL, -EINVAL}, 66 + .overcurrent_pin= {-EINVAL, -EINVAL}, 65 67 }; 66 68 67 69 ··· 137 135 static struct atmel_nand_data __initdata cam60_nand_data = { 138 136 .ale = 21, 139 137 .cle = 22, 140 - // .det_pin = ... not there 138 + .det_pin = -EINVAL, 141 139 .rdy_pin = AT91_PIN_PA9, 142 140 .enable_pin = AT91_PIN_PA7, 143 141 .parts = cam60_nand_partition,
+9 -6
arch/arm/mach-at91/board-cap9adk.c
··· 70 70 */ 71 71 static struct at91_usbh_data __initdata cap9adk_usbh_data = { 72 72 .ports = 2, 73 + .vbus_pin = {-EINVAL, -EINVAL}, 74 + .overcurrent_pin= {-EINVAL, -EINVAL}, 73 75 }; 74 76 75 77 /* ··· 146 144 */ 147 145 static struct at91_mmc_data __initdata cap9adk_mmc_data = { 148 146 .wire4 = 1, 149 - // .det_pin = ... not connected 150 - // .wp_pin = ... not connected 151 - // .vcc_pin = ... not connected 147 + .det_pin = -EINVAL, 148 + .wp_pin = -EINVAL, 149 + .vcc_pin = -EINVAL, 152 150 }; 153 151 154 152 ··· 156 154 * MACB Ethernet device 157 155 */ 158 156 static struct macb_platform_data __initdata cap9adk_macb_data = { 157 + .phy_irq_pin = -EINVAL, 159 158 .is_rmii = 1, 160 159 }; 161 160 ··· 175 172 static struct atmel_nand_data __initdata cap9adk_nand_data = { 176 173 .ale = 21, 177 174 .cle = 22, 178 - // .det_pin = ... not connected 179 - // .rdy_pin = ... not connected 175 + .det_pin = -EINVAL, 176 + .rdy_pin = -EINVAL, 180 177 .enable_pin = AT91_PIN_PD15, 181 178 .parts = cap9adk_nand_partitions, 182 179 .num_parts = ARRAY_SIZE(cap9adk_nand_partitions), ··· 354 351 * AC97 355 352 */ 356 353 static struct ac97c_platform_data cap9adk_ac97_data = { 357 - // .reset_pin = ... not connected 354 + .reset_pin = -EINVAL, 358 355 }; 359 356 360 357
+5 -2
arch/arm/mach-at91/board-carmeva.c
··· 64 64 65 65 static struct at91_usbh_data __initdata carmeva_usbh_data = { 66 66 .ports = 2, 67 + .vbus_pin = {-EINVAL, -EINVAL}, 68 + .overcurrent_pin= {-EINVAL, -EINVAL}, 67 69 }; 68 70 69 71 static struct at91_udc_data __initdata carmeva_udc_data = { ··· 77 75 // static struct at91_cf_data __initdata carmeva_cf_data = { 78 76 // .det_pin = AT91_PIN_PB0, 79 77 // .rst_pin = AT91_PIN_PC5, 80 - // .irq_pin = ... not connected 81 - // .vcc_pin = ... always powered 78 + // .irq_pin = -EINVAL, 79 + // .vcc_pin = -EINVAL, 82 80 // }; 83 81 84 82 static struct at91_mmc_data __initdata carmeva_mmc_data = { ··· 86 84 .wire4 = 1, 87 85 .det_pin = AT91_PIN_PB10, 88 86 .wp_pin = AT91_PIN_PC14, 87 + .vcc_pin = -EINVAL, 89 88 }; 90 89 91 90 static struct spi_board_info carmeva_spi_devices[] = {
+7 -1
arch/arm/mach-at91/board-cpu9krea.c
··· 86 86 */ 87 87 static struct at91_usbh_data __initdata cpu9krea_usbh_data = { 88 88 .ports = 2, 89 + .vbus_pin = {-EINVAL, -EINVAL}, 90 + .overcurrent_pin= {-EINVAL, -EINVAL}, 89 91 }; 90 92 91 93 /* ··· 95 93 */ 96 94 static struct at91_udc_data __initdata cpu9krea_udc_data = { 97 95 .vbus_pin = AT91_PIN_PC8, 98 - .pullup_pin = 0, /* pull-up driven by UDC */ 96 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 99 97 }; 100 98 101 99 /* 102 100 * MACB Ethernet device 103 101 */ 104 102 static struct macb_platform_data __initdata cpu9krea_macb_data = { 103 + .phy_irq_pin = -EINVAL, 105 104 .is_rmii = 1, 106 105 }; 107 106 ··· 115 112 .rdy_pin = AT91_PIN_PC13, 116 113 .enable_pin = AT91_PIN_PC14, 117 114 .bus_width_16 = 0, 115 + .det_pin = -EINVAL, 118 116 }; 119 117 120 118 #ifdef CONFIG_MACH_CPU9260 ··· 341 337 .slot_b = 0, 342 338 .wire4 = 1, 343 339 .det_pin = AT91_PIN_PA29, 340 + .wp_pin = -EINVAL, 341 + .vcc_pin = -EINVAL, 344 342 }; 345 343 346 344 static void __init cpu9krea_board_init(void)
+5
arch/arm/mach-at91/board-cpuat91.c
··· 83 83 } 84 84 85 85 static struct macb_platform_data __initdata cpuat91_eth_data = { 86 + .phy_irq_pin = -EINVAL, 86 87 .is_rmii = 1, 87 88 }; 88 89 89 90 static struct at91_usbh_data __initdata cpuat91_usbh_data = { 90 91 .ports = 1, 92 + .vbus_pin = {-EINVAL, -EINVAL}, 93 + .overcurrent_pin= {-EINVAL, -EINVAL}, 91 94 }; 92 95 93 96 static struct at91_udc_data __initdata cpuat91_udc_data = { ··· 101 98 static struct at91_mmc_data __initdata cpuat91_mmc_data = { 102 99 .det_pin = AT91_PIN_PC2, 103 100 .wire4 = 1, 101 + .wp_pin = -EINVAL, 102 + .vcc_pin = -EINVAL, 104 103 }; 105 104 106 105 static struct physmap_flash_data cpuat91_flash_data = {
+4 -1
arch/arm/mach-at91/board-csb337.c
··· 65 65 66 66 static struct at91_usbh_data __initdata csb337_usbh_data = { 67 67 .ports = 2, 68 + .vbus_pin = {-EINVAL, -EINVAL}, 69 + .overcurrent_pin= {-EINVAL, -EINVAL}, 68 70 }; 69 71 70 72 static struct at91_udc_data __initdata csb337_udc_data = { 71 - // this has no VBUS sensing pin 72 73 .pullup_pin = AT91_PIN_PA24, 74 + .vbus_pin = -EINVAL, 73 75 }; 74 76 75 77 static struct i2c_board_info __initdata csb337_i2c_devices[] = { ··· 100 98 .slot_b = 0, 101 99 .wire4 = 1, 102 100 .wp_pin = AT91_PIN_PD6, 101 + .vcc_pin = -EINVAL, 103 102 }; 104 103 105 104 static struct spi_board_info csb337_spi_devices[] = {
+2
arch/arm/mach-at91/board-csb637.c
··· 59 59 60 60 static struct at91_usbh_data __initdata csb637_usbh_data = { 61 61 .ports = 2, 62 + .vbus_pin = {-EINVAL, -EINVAL}, 63 + .overcurrent_pin= {-EINVAL, -EINVAL}, 62 64 }; 63 65 64 66 static struct at91_udc_data __initdata csb637_udc_data = {
+1
arch/arm/mach-at91/board-dt.c
··· 50 50 static struct atmel_nand_data __initdata ek_nand_data = { 51 51 .ale = 21, 52 52 .cle = 22, 53 + .det_pin = -EINVAL, 53 54 .rdy_pin = AT91_PIN_PC8, 54 55 .enable_pin = AT91_PIN_PC14, 55 56 };
+7 -2
arch/arm/mach-at91/board-eb9200.c
··· 67 67 68 68 static struct at91_usbh_data __initdata eb9200_usbh_data = { 69 69 .ports = 2, 70 + .vbus_pin = {-EINVAL, -EINVAL}, 71 + .overcurrent_pin= {-EINVAL, -EINVAL}, 70 72 }; 71 73 72 74 static struct at91_udc_data __initdata eb9200_udc_data = { ··· 77 75 }; 78 76 79 77 static struct at91_cf_data __initdata eb9200_cf_data = { 78 + .irq_pin = -EINVAL, 80 79 .det_pin = AT91_PIN_PB0, 80 + .vcc_pin = -EINVAL, 81 81 .rst_pin = AT91_PIN_PC5, 82 - // .irq_pin = ... not connected 83 - // .vcc_pin = ... always powered 84 82 }; 85 83 86 84 static struct at91_mmc_data __initdata eb9200_mmc_data = { 87 85 .slot_b = 0, 88 86 .wire4 = 1, 87 + .det_pin = -EINVAL, 88 + .wp_pin = -EINVAL, 89 + .vcc_pin = -EINVAL, 89 90 }; 90 91 91 92 static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
+5
arch/arm/mach-at91/board-ecbat91.c
··· 71 71 72 72 static struct at91_usbh_data __initdata ecb_at91usbh_data = { 73 73 .ports = 1, 74 + .vbus_pin = {-EINVAL, -EINVAL}, 75 + .overcurrent_pin= {-EINVAL, -EINVAL}, 74 76 }; 75 77 76 78 static struct at91_mmc_data __initdata ecb_at91mmc_data = { 77 79 .slot_b = 0, 78 80 .wire4 = 1, 81 + .det_pin = -EINVAL, 82 + .wp_pin = -EINVAL, 83 + .vcc_pin = -EINVAL, 79 84 }; 80 85 81 86
+5
arch/arm/mach-at91/board-eco920.c
··· 54 54 55 55 static struct at91_usbh_data __initdata eco920_usbh_data = { 56 56 .ports = 1, 57 + .vbus_pin = {-EINVAL, -EINVAL}, 58 + .overcurrent_pin= {-EINVAL, -EINVAL}, 57 59 }; 58 60 59 61 static struct at91_udc_data __initdata eco920_udc_data = { ··· 66 64 static struct at91_mmc_data __initdata eco920_mmc_data = { 67 65 .slot_b = 0, 68 66 .wire4 = 0, 67 + .det_pin = -EINVAL, 68 + .wp_pin = -EINVAL, 69 + .vcc_pin = -EINVAL, 69 70 }; 70 71 71 72 static struct physmap_flash_data eco920_flash_data = {
+4 -1
arch/arm/mach-at91/board-flexibity.c
··· 52 52 /* USB Host port */ 53 53 static struct at91_usbh_data __initdata flexibity_usbh_data = { 54 54 .ports = 2, 55 + .vbus_pin = {-EINVAL, -EINVAL}, 56 + .overcurrent_pin= {-EINVAL, -EINVAL}, 55 57 }; 56 58 57 59 /* USB Device port */ 58 60 static struct at91_udc_data __initdata flexibity_udc_data = { 59 61 .vbus_pin = AT91_PIN_PC5, 60 - .pullup_pin = 0, /* pull-up driven by UDC */ 62 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 61 63 }; 62 64 63 65 /* SPI devices */ ··· 78 76 .wire4 = 1, 79 77 .det_pin = AT91_PIN_PC9, 80 78 .wp_pin = AT91_PIN_PC4, 79 + .vcc_pin = -EINVAL, 81 80 }; 82 81 83 82 /* LEDs */
+6 -1
arch/arm/mach-at91/board-foxg20.c
··· 106 106 */ 107 107 static struct at91_usbh_data __initdata foxg20_usbh_data = { 108 108 .ports = 2, 109 + .vbus_pin = {-EINVAL, -EINVAL}, 110 + .overcurrent_pin= {-EINVAL, -EINVAL}, 109 111 }; 110 112 111 113 /* ··· 115 113 */ 116 114 static struct at91_udc_data __initdata foxg20_udc_data = { 117 115 .vbus_pin = AT91_PIN_PC6, 118 - .pullup_pin = 0, /* pull-up driven by UDC */ 116 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 119 117 }; 120 118 121 119 ··· 149 147 static struct at91_mmc_data __initdata foxg20_mmc_data = { 150 148 .slot_b = 1, 151 149 .wire4 = 1, 150 + .det_pin = -EINVAL, 151 + .wp_pin = -EINVAL, 152 + .vcc_pin = -EINVAL, 152 153 }; 153 154 154 155
+4 -1
arch/arm/mach-at91/board-gsia18s.c
··· 80 80 */ 81 81 static struct at91_usbh_data __initdata usbh_data = { 82 82 .ports = 2, 83 + .vbus_pin = {-EINVAL, -EINVAL}, 84 + .overcurrent_pin= {-EINVAL, -EINVAL}, 83 85 }; 84 86 85 87 /* ··· 89 87 */ 90 88 static struct at91_udc_data __initdata udc_data = { 91 89 .vbus_pin = AT91_PIN_PA22, 92 - .pullup_pin = 0, /* pull-up driven by UDC */ 90 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 93 91 }; 94 92 95 93 /* ··· 532 530 static struct at91_cf_data __initdata gsia18s_cf1_data = { 533 531 .irq_pin = AT91_PIN_PA27, 534 532 .det_pin = AT91_PIN_PB30, 533 + .vcc_pin = -EINVAL, 535 534 .rst_pin = AT91_PIN_PB31, 536 535 .chipselect = 5, 537 536 .flags = AT91_CF_TRUE_IDE,
+2
arch/arm/mach-at91/board-kafa.c
··· 68 68 69 69 static struct at91_usbh_data __initdata kafa_usbh_data = { 70 70 .ports = 1, 71 + .vbus_pin = {-EINVAL, -EINVAL}, 72 + .overcurrent_pin= {-EINVAL, -EINVAL}, 71 73 }; 72 74 73 75 static struct at91_udc_data __initdata kafa_udc_data = {
+5 -1
arch/arm/mach-at91/board-kb9202.c
··· 76 76 77 77 static struct at91_usbh_data __initdata kb9202_usbh_data = { 78 78 .ports = 1, 79 + .vbus_pin = {-EINVAL, -EINVAL}, 80 + .overcurrent_pin= {-EINVAL, -EINVAL}, 79 81 }; 80 82 81 83 static struct at91_udc_data __initdata kb9202_udc_data = { ··· 89 87 .det_pin = AT91_PIN_PB2, 90 88 .slot_b = 0, 91 89 .wire4 = 1, 90 + .wp_pin = -EINVAL, 91 + .vcc_pin = -EINVAL, 92 92 }; 93 93 94 94 static struct mtd_partition __initdata kb9202_nand_partition[] = { ··· 104 100 static struct atmel_nand_data __initdata kb9202_nand_data = { 105 101 .ale = 22, 106 102 .cle = 21, 107 - // .det_pin = ... not there 103 + .det_pin = -EINVAL, 108 104 .rdy_pin = AT91_PIN_PC29, 109 105 .enable_pin = AT91_PIN_PC28, 110 106 .parts = kb9202_nand_partition,
+4 -1
arch/arm/mach-at91/board-neocore926.c
··· 72 72 static struct at91_usbh_data __initdata neocore926_usbh_data = { 73 73 .ports = 2, 74 74 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 }, 75 + .overcurrent_pin= {-EINVAL, -EINVAL}, 75 76 }; 76 77 77 78 /* ··· 80 79 */ 81 80 static struct at91_udc_data __initdata neocore926_udc_data = { 82 81 .vbus_pin = AT91_PIN_PA25, 83 - .pullup_pin = 0, /* pull-up driven by UDC */ 82 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 84 83 }; 85 84 86 85 ··· 150 149 .wire4 = 1, 151 150 .det_pin = AT91_PIN_PE18, 152 151 .wp_pin = AT91_PIN_PE19, 152 + .vcc_pin = -EINVAL, 153 153 }; 154 154 155 155 ··· 192 190 .enable_pin = AT91_PIN_PD15, 193 191 .parts = neocore926_nand_partition, 194 192 .num_parts = ARRAY_SIZE(neocore926_nand_partition), 193 + .det_pin = -EINVAL, 195 194 }; 196 195 197 196 static struct sam9_smc_config __initdata neocore926_nand_smc_config = {
+2
arch/arm/mach-at91/board-pcontrol-g20.c
··· 107 107 */ 108 108 static struct at91_usbh_data __initdata usbh_data = { 109 109 .ports = 2, 110 + .vbus_pin = {-EINVAL, -EINVAL}, 111 + .overcurrent_pin= {-EINVAL, -EINVAL}, 110 112 }; 111 113 112 114
+3
arch/arm/mach-at91/board-picotux200.c
··· 67 67 68 68 static struct at91_usbh_data __initdata picotux200_usbh_data = { 69 69 .ports = 1, 70 + .vbus_pin = {-EINVAL, -EINVAL}, 71 + .overcurrent_pin= {-EINVAL, -EINVAL}, 70 72 }; 71 73 72 74 static struct at91_mmc_data __initdata picotux200_mmc_data = { ··· 76 74 .slot_b = 0, 77 75 .wire4 = 1, 78 76 .wp_pin = AT91_PIN_PA17, 77 + .vcc_pin = -EINVAL, 79 78 }; 80 79 81 80 #define PICOTUX200_FLASH_BASE AT91_CHIPSELECT_0
+7 -5
arch/arm/mach-at91/board-qil-a9260.c
··· 77 77 */ 78 78 static struct at91_usbh_data __initdata ek_usbh_data = { 79 79 .ports = 2, 80 + .vbus_pin = {-EINVAL, -EINVAL}, 81 + .overcurrent_pin= {-EINVAL, -EINVAL}, 80 82 }; 81 83 82 84 /* ··· 86 84 */ 87 85 static struct at91_udc_data __initdata ek_udc_data = { 88 86 .vbus_pin = AT91_PIN_PC5, 89 - .pullup_pin = 0, /* pull-up driven by UDC */ 87 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 90 88 }; 91 89 92 90 /* ··· 135 133 static struct atmel_nand_data __initdata ek_nand_data = { 136 134 .ale = 21, 137 135 .cle = 22, 138 - // .det_pin = ... not connected 136 + .det_pin = -EINVAL, 139 137 .rdy_pin = AT91_PIN_PC13, 140 138 .enable_pin = AT91_PIN_PC14, 141 139 .parts = ek_nand_partition, ··· 174 172 static struct at91_mmc_data __initdata ek_mmc_data = { 175 173 .slot_b = 0, 176 174 .wire4 = 1, 177 - // .det_pin = ... not connected 178 - // .wp_pin = ... not connected 179 - // .vcc_pin = ... not connected 175 + .det_pin = -EINVAL, 176 + .wp_pin = -EINVAL, 177 + .vcc_pin = -EINVAL, 180 178 }; 181 179 182 180 /*
+8 -3
arch/arm/mach-at91/board-rm9200dk.c
··· 72 72 73 73 static struct at91_usbh_data __initdata dk_usbh_data = { 74 74 .ports = 2, 75 + .vbus_pin = {-EINVAL, -EINVAL}, 76 + .overcurrent_pin= {-EINVAL, -EINVAL}, 75 77 }; 76 78 77 79 static struct at91_udc_data __initdata dk_udc_data = { ··· 82 80 }; 83 81 84 82 static struct at91_cf_data __initdata dk_cf_data = { 83 + .irq_pin = -EINVAL, 85 84 .det_pin = AT91_PIN_PB0, 85 + .vcc_pin = -EINVAL, 86 86 .rst_pin = AT91_PIN_PC5, 87 - // .irq_pin = ... not connected 88 - // .vcc_pin = ... always powered 89 87 }; 90 88 91 89 #ifndef CONFIG_MTD_AT91_DATAFLASH_CARD 92 90 static struct at91_mmc_data __initdata dk_mmc_data = { 93 91 .slot_b = 0, 94 92 .wire4 = 1, 93 + .det_pin = -EINVAL, 94 + .wp_pin = -EINVAL, 95 + .vcc_pin = -EINVAL, 95 96 }; 96 97 #endif 97 98 ··· 148 143 .cle = 21, 149 144 .det_pin = AT91_PIN_PB1, 150 145 .rdy_pin = AT91_PIN_PC2, 151 - // .enable_pin = ... not there 146 + .enable_pin = -EINVAL, 152 147 .parts = dk_nand_partition, 153 148 .num_parts = ARRAY_SIZE(dk_nand_partition), 154 149 };
+3
arch/arm/mach-at91/board-rm9200ek.c
··· 72 72 73 73 static struct at91_usbh_data __initdata ek_usbh_data = { 74 74 .ports = 2, 75 + .vbus_pin = {-EINVAL, -EINVAL}, 76 + .overcurrent_pin= {-EINVAL, -EINVAL}, 75 77 }; 76 78 77 79 static struct at91_udc_data __initdata ek_udc_data = { ··· 87 85 .slot_b = 0, 88 86 .wire4 = 1, 89 87 .wp_pin = AT91_PIN_PA17, 88 + .vcc_pin = -EINVAL, 90 89 }; 91 90 #endif 92 91
+2
arch/arm/mach-at91/board-rsi-ews.c
··· 70 70 */ 71 71 static struct at91_usbh_data rsi_ews_usbh_data __initdata = { 72 72 .ports = 1, 73 + .vbus_pin = {-EINVAL, -EINVAL}, 74 + .overcurrent_pin= {-EINVAL, -EINVAL}, 73 75 }; 74 76 75 77 /*
+5 -3
arch/arm/mach-at91/board-sam9-l9260.c
··· 72 72 */ 73 73 static struct at91_usbh_data __initdata ek_usbh_data = { 74 74 .ports = 2, 75 + .vbus_pin = {-EINVAL, -EINVAL}, 76 + .overcurrent_pin= {-EINVAL, -EINVAL}, 75 77 }; 76 78 77 79 /* ··· 81 79 */ 82 80 static struct at91_udc_data __initdata ek_udc_data = { 83 81 .vbus_pin = AT91_PIN_PC5, 84 - .pullup_pin = 0, /* pull-up driven by UDC */ 82 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 85 83 }; 86 84 87 85 ··· 136 134 static struct atmel_nand_data __initdata ek_nand_data = { 137 135 .ale = 21, 138 136 .cle = 22, 139 - // .det_pin = ... not connected 137 + .det_pin = -EINVAL, 140 138 .rdy_pin = AT91_PIN_PC13, 141 139 .enable_pin = AT91_PIN_PC14, 142 140 .parts = ek_nand_partition, ··· 178 176 .wire4 = 1, 179 177 .det_pin = AT91_PIN_PC8, 180 178 .wp_pin = AT91_PIN_PC4, 181 - // .vcc_pin = ... not connected 179 + .vcc_pin = -EINVAL, 182 180 }; 183 181 184 182 static void __init ek_board_init(void)
+7 -5
arch/arm/mach-at91/board-sam9260ek.c
··· 75 75 */ 76 76 static struct at91_usbh_data __initdata ek_usbh_data = { 77 77 .ports = 2, 78 + .vbus_pin = {-EINVAL, -EINVAL}, 79 + .overcurrent_pin= {-EINVAL, -EINVAL}, 78 80 }; 79 81 80 82 /* ··· 84 82 */ 85 83 static struct at91_udc_data __initdata ek_udc_data = { 86 84 .vbus_pin = AT91_PIN_PC5, 87 - .pullup_pin = 0, /* pull-up driven by UDC */ 85 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 88 86 }; 89 87 90 88 ··· 178 176 static struct atmel_nand_data __initdata ek_nand_data = { 179 177 .ale = 21, 180 178 .cle = 22, 181 - // .det_pin = ... not connected 179 + .det_pin = -EINVAL, 182 180 .rdy_pin = AT91_PIN_PC13, 183 181 .enable_pin = AT91_PIN_PC14, 184 182 .parts = ek_nand_partition, ··· 225 223 static struct at91_mmc_data __initdata ek_mmc_data = { 226 224 .slot_b = 1, 227 225 .wire4 = 1, 228 - // .det_pin = ... not connected 229 - // .wp_pin = ... not connected 230 - // .vcc_pin = ... not connected 226 + .det_pin = -EINVAL, 227 + .wp_pin = -EINVAL, 228 + .vcc_pin = -EINVAL, 231 229 }; 232 230 233 231
+7 -2
arch/arm/mach-at91/board-sam9261ek.c
··· 151 151 */ 152 152 static struct at91_usbh_data __initdata ek_usbh_data = { 153 153 .ports = 2, 154 + .vbus_pin = {-EINVAL, -EINVAL}, 155 + .overcurrent_pin= {-EINVAL, -EINVAL}, 154 156 }; 155 157 156 158 ··· 161 159 */ 162 160 static struct at91_udc_data __initdata ek_udc_data = { 163 161 .vbus_pin = AT91_PIN_PB29, 164 - .pullup_pin = 0, /* pull-up driven by UDC */ 162 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 165 163 }; 166 164 167 165 ··· 184 182 static struct atmel_nand_data __initdata ek_nand_data = { 185 183 .ale = 22, 186 184 .cle = 21, 187 - // .det_pin = ... not connected 185 + .det_pin = -EINVAL, 188 186 .rdy_pin = AT91_PIN_PC15, 189 187 .enable_pin = AT91_PIN_PC14, 190 188 .parts = ek_nand_partition, ··· 347 345 */ 348 346 static struct at91_mmc_data __initdata ek_mmc_data = { 349 347 .wire4 = 1, 348 + .det_pin = -EINVAL, 349 + .wp_pin = -EINVAL, 350 + .vcc_pin = -EINVAL, 350 351 }; 351 352 352 353 #endif /* CONFIG_SPI_ATMEL_* */
+5 -3
arch/arm/mach-at91/board-sam9263ek.c
··· 74 74 static struct at91_usbh_data __initdata ek_usbh_data = { 75 75 .ports = 2, 76 76 .vbus_pin = { AT91_PIN_PA24, AT91_PIN_PA21 }, 77 + .overcurrent_pin= {-EINVAL, -EINVAL}, 77 78 }; 78 79 79 80 /* ··· 82 81 */ 83 82 static struct at91_udc_data __initdata ek_udc_data = { 84 83 .vbus_pin = AT91_PIN_PA25, 85 - .pullup_pin = 0, /* pull-up driven by UDC */ 84 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 86 85 }; 87 86 88 87 ··· 152 151 .wire4 = 1, 153 152 .det_pin = AT91_PIN_PE18, 154 153 .wp_pin = AT91_PIN_PE19, 155 - // .vcc_pin = ... not connected 154 + .vcc_pin = -EINVAL, 156 155 }; 157 156 158 157 ··· 184 183 static struct atmel_nand_data __initdata ek_nand_data = { 185 184 .ale = 21, 186 185 .cle = 22, 187 - // .det_pin = ... not connected 186 + .det_pin = -EINVAL, 188 187 .rdy_pin = AT91_PIN_PA22, 189 188 .enable_pin = AT91_PIN_PD15, 190 189 .parts = ek_nand_partition, ··· 354 353 * reset_pin is not connected: NRST 355 354 */ 356 355 static struct ac97c_platform_data ek_ac97_data = { 356 + .reset_pin = -EINVAL, 357 357 }; 358 358 359 359
+8 -1
arch/arm/mach-at91/board-sam9g20ek.c
··· 86 86 */ 87 87 static struct at91_usbh_data __initdata ek_usbh_data = { 88 88 .ports = 2, 89 + .vbus_pin = {-EINVAL, -EINVAL}, 90 + .overcurrent_pin= {-EINVAL, -EINVAL}, 89 91 }; 90 92 91 93 /* ··· 95 93 */ 96 94 static struct at91_udc_data __initdata ek_udc_data = { 97 95 .vbus_pin = AT91_PIN_PC5, 98 - .pullup_pin = 0, /* pull-up driven by UDC */ 96 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 99 97 }; 100 98 101 99 ··· 165 163 .cle = 22, 166 164 .rdy_pin = AT91_PIN_PC13, 167 165 .enable_pin = AT91_PIN_PC14, 166 + .det_pin = -EINVAL, 168 167 .parts = ek_nand_partition, 169 168 .num_parts = ARRAY_SIZE(ek_nand_partition), 170 169 }; ··· 213 210 .slot[1] = { 214 211 .bus_width = 4, 215 212 .detect_pin = AT91_PIN_PC9, 213 + .wp_pin = -EINVAL, 216 214 }, 217 215 218 216 }; ··· 222 218 .slot_b = 1, /* Only one slot so use slot B */ 223 219 .wire4 = 1, 224 220 .det_pin = AT91_PIN_PC9, 221 + .wp_pin = -EINVAL, 222 + .vcc_pin = -EINVAL, 225 223 }; 226 224 #endif 227 225 ··· 233 227 if (ek_have_2mmc()) { 234 228 ek_mmc_data.slot[0].bus_width = 4; 235 229 ek_mmc_data.slot[0].detect_pin = AT91_PIN_PC2; 230 + ek_mmc_data.slot[0].wp_pin = -1; 236 231 } 237 232 at91_add_device_mci(0, &ek_mmc_data); 238 233 #else
+4
arch/arm/mach-at91/board-sam9m10g45ek.c
··· 69 69 static struct at91_usbh_data __initdata ek_usbh_hs_data = { 70 70 .ports = 2, 71 71 .vbus_pin = {AT91_PIN_PD1, AT91_PIN_PD3}, 72 + .overcurrent_pin= {-EINVAL, -EINVAL}, 72 73 }; 73 74 74 75 ··· 101 100 .slot[0] = { 102 101 .bus_width = 4, 103 102 .detect_pin = AT91_PIN_PD10, 103 + .wp_pin = -EINVAL, 104 104 }, 105 105 }; 106 106 ··· 145 143 .cle = 22, 146 144 .rdy_pin = AT91_PIN_PC8, 147 145 .enable_pin = AT91_PIN_PC14, 146 + .det_pin = -EINVAL, 148 147 .parts = ek_nand_partition, 149 148 .num_parts = ARRAY_SIZE(ek_nand_partition), 150 149 }; ··· 333 330 * reset_pin is not connected: NRST 334 331 */ 335 332 static struct ac97c_platform_data ek_ac97_data = { 333 + .reset_pin = -EINVAL, 336 334 }; 337 335 338 336
+4 -3
arch/arm/mach-at91/board-sam9rlek.c
··· 67 67 static struct at91_mmc_data __initdata ek_mmc_data = { 68 68 .wire4 = 1, 69 69 .det_pin = AT91_PIN_PA15, 70 - // .wp_pin = ... not connected 71 - // .vcc_pin = ... not connected 70 + .wp_pin = -EINVAL, 71 + .vcc_pin = -EINVAL, 72 72 }; 73 73 74 74 ··· 91 91 static struct atmel_nand_data __initdata ek_nand_data = { 92 92 .ale = 21, 93 93 .cle = 22, 94 - // .det_pin = ... not connected 94 + .det_pin = -EINVAL, 95 95 .rdy_pin = AT91_PIN_PD17, 96 96 .enable_pin = AT91_PIN_PB6, 97 97 .parts = ek_nand_partition, ··· 204 204 * reset_pin is not connected: NRST 205 205 */ 206 206 static struct ac97c_platform_data ek_ac97_data = { 207 + .reset_pin = -EINVAL, 207 208 }; 208 209 209 210
+6
arch/arm/mach-at91/board-snapper9260.c
··· 57 57 58 58 static struct at91_usbh_data __initdata snapper9260_usbh_data = { 59 59 .ports = 2, 60 + .vbus_pin = {-EINVAL, -EINVAL}, 61 + .overcurrent_pin= {-EINVAL, -EINVAL}, 60 62 }; 61 63 62 64 static struct at91_udc_data __initdata snapper9260_udc_data = { 63 65 .vbus_pin = SNAPPER9260_IO_EXP_GPIO(5), 64 66 .vbus_active_low = 1, 65 67 .vbus_polled = 1, 68 + .pullup_pin = -EINVAL, 66 69 }; 67 70 68 71 static struct macb_platform_data snapper9260_macb_data = { 72 + .phy_irq_pin = -EINVAL, 69 73 .is_rmii = 1, 70 74 }; 71 75 ··· 108 104 .parts = snapper9260_nand_partitions, 109 105 .num_parts = ARRAY_SIZE(snapper9260_nand_partitions), 110 106 .bus_width_16 = 0, 107 + .enable_pin = -EINVAL, 108 + .det_pin = -EINVAL, 111 109 }; 112 110 113 111 static struct sam9_smc_config __initdata snapper9260_nand_smc_config = {
+10 -2
arch/arm/mach-at91/board-stamp9g20.c
··· 85 85 .rdy_pin = AT91_PIN_PC13, 86 86 .enable_pin = AT91_PIN_PC14, 87 87 .bus_width_16 = 0, 88 + .det_pin = -EINVAL, 88 89 }; 89 90 90 91 static struct sam9_smc_config __initdata nand_smc_config = { ··· 123 122 static struct mci_platform_data __initdata mmc_data = { 124 123 .slot[0] = { 125 124 .bus_width = 4, 125 + .detect_pin = -1; 126 + .wp_pin = -1; 126 127 }, 127 128 }; 128 129 #else 129 130 static struct at91_mmc_data __initdata mmc_data = { 130 131 .slot_b = 0, 131 132 .wire4 = 1, 133 + .det_pin = -EINVAL, 134 + .wp_pin = -EINVAL, 135 + .vcc_pin = -EINVAL, 132 136 }; 133 137 #endif 134 138 ··· 143 137 */ 144 138 static struct at91_usbh_data __initdata usbh_data = { 145 139 .ports = 2, 140 + .vbus_pin = {-EINVAL, -EINVAL}, 141 + .overcurrent_pin= {-EINVAL, -EINVAL}, 146 142 }; 147 143 148 144 ··· 153 145 */ 154 146 static struct at91_udc_data __initdata portuxg20_udc_data = { 155 147 .vbus_pin = AT91_PIN_PC7, 156 - .pullup_pin = 0, /* pull-up driven by UDC */ 148 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 157 149 }; 158 150 159 151 static struct at91_udc_data __initdata stamp9g20evb_udc_data = { 160 152 .vbus_pin = AT91_PIN_PA22, 161 - .pullup_pin = 0, /* pull-up driven by UDC */ 153 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 162 154 }; 163 155 164 156
+4 -2
arch/arm/mach-at91/board-usb-a926x.c
··· 66 66 */ 67 67 static struct at91_usbh_data __initdata ek_usbh_data = { 68 68 .ports = 2, 69 + .vbus_pin = {-EINVAL, -EINVAL}, 70 + .overcurrent_pin= {-EINVAL, -EINVAL}, 69 71 }; 70 72 71 73 /* ··· 75 73 */ 76 74 static struct at91_udc_data __initdata ek_udc_data = { 77 75 .vbus_pin = AT91_PIN_PB11, 78 - .pullup_pin = 0, /* pull-up driven by UDC */ 76 + .pullup_pin = -EINVAL, /* pull-up driven by UDC */ 79 77 }; 80 78 81 79 static void __init ek_add_device_udc(void) ··· 195 193 static struct atmel_nand_data __initdata ek_nand_data = { 196 194 .ale = 21, 197 195 .cle = 22, 198 - // .det_pin = ... not connected 196 + .det_pin = -EINVAL, 199 197 .rdy_pin = AT91_PIN_PA22, 200 198 .enable_pin = AT91_PIN_PD15, 201 199 .parts = ek_nand_partition,
+5 -2
arch/arm/mach-at91/board-yl-9200.c
··· 120 120 */ 121 121 static struct at91_usbh_data __initdata yl9200_usbh_data = { 122 122 .ports = 1, /* PQFP version of AT91RM9200 */ 123 + .vbus_pin = {-EINVAL, -EINVAL}, 124 + .overcurrent_pin= {-EINVAL, -EINVAL}, 123 125 }; 124 126 125 127 /* ··· 139 137 */ 140 138 static struct at91_mmc_data __initdata yl9200_mmc_data = { 141 139 .det_pin = AT91_PIN_PB9, 142 - // .wp_pin = ... not connected 143 140 .wire4 = 1, 141 + .wp_pin = -EINVAL, 142 + .vcc_pin = -EINVAL, 144 143 }; 145 144 146 145 /* ··· 178 175 static struct atmel_nand_data __initdata yl9200_nand_data = { 179 176 .ale = 6, 180 177 .cle = 7, 181 - // .det_pin = ... not connected 178 + .det_pin = -EINVAL, 182 179 .rdy_pin = AT91_PIN_PC14, /* R/!B (Sheet10) */ 183 180 .enable_pin = AT91_PIN_PC15, /* !CE (Sheet10) */ 184 181 .parts = yl9200_nand_partition,
+14 -14
arch/arm/mach-at91/include/mach/board.h
··· 44 44 45 45 /* USB Device */ 46 46 struct at91_udc_data { 47 - u8 vbus_pin; /* high == host powering us */ 47 + int vbus_pin; /* high == host powering us */ 48 48 u8 vbus_active_low; /* vbus polarity */ 49 49 u8 vbus_polled; /* Use polling, not interrupt */ 50 - u8 pullup_pin; /* active == D+ pulled up */ 50 + int pullup_pin; /* active == D+ pulled up */ 51 51 u8 pullup_active_low; /* true == pullup_pin is active low */ 52 52 }; 53 53 extern void __init at91_add_device_udc(struct at91_udc_data *data); ··· 57 57 58 58 /* Compact Flash */ 59 59 struct at91_cf_data { 60 - u8 irq_pin; /* I/O IRQ */ 61 - u8 det_pin; /* Card detect */ 62 - u8 vcc_pin; /* power switching */ 63 - u8 rst_pin; /* card reset */ 60 + int irq_pin; /* I/O IRQ */ 61 + int det_pin; /* Card detect */ 62 + int vcc_pin; /* power switching */ 63 + int rst_pin; /* card reset */ 64 64 u8 chipselect; /* EBI Chip Select number */ 65 65 u8 flags; 66 66 #define AT91_CF_TRUE_IDE 0x01 ··· 71 71 /* MMC / SD */ 72 72 /* at91_mci platform config */ 73 73 struct at91_mmc_data { 74 - u8 det_pin; /* card detect IRQ */ 74 + int det_pin; /* card detect IRQ */ 75 75 unsigned slot_b:1; /* uses Slot B */ 76 76 unsigned wire4:1; /* (SD) supports DAT0..DAT3 */ 77 - u8 wp_pin; /* (SD) writeprotect detect */ 78 - u8 vcc_pin; /* power switching (high == on) */ 77 + int wp_pin; /* (SD) writeprotect detect */ 78 + int vcc_pin; /* power switching (high == on) */ 79 79 }; 80 80 extern void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data); 81 81 ··· 87 87 /* USB Host */ 88 88 struct at91_usbh_data { 89 89 u8 ports; /* number of ports on root hub */ 90 - u8 vbus_pin[2]; /* port power-control pin */ 90 + int vbus_pin[2]; /* port power-control pin */ 91 91 u8 vbus_pin_inverted; 92 92 u8 overcurrent_supported; 93 - u8 overcurrent_pin[2]; 93 + int overcurrent_pin[2]; 94 94 u8 overcurrent_status[2]; 95 95 u8 overcurrent_changed[2]; 96 96 }; ··· 100 100 101 101 /* NAND / SmartMedia */ 102 102 struct atmel_nand_data { 103 - u8 enable_pin; /* chip enable */ 104 - u8 det_pin; /* card detect */ 105 - u8 rdy_pin; /* ready/busy */ 103 + int enable_pin; /* chip enable */ 104 + int det_pin; /* card detect */ 105 + int rdy_pin; /* ready/busy */ 106 106 u8 rdy_pin_active_low; /* rdy_pin value is inverted */ 107 107 u8 ale; /* address line number connected to ALE */ 108 108 u8 cle; /* address line number connected to CLE */
+1 -1
include/linux/platform_data/macb.h
··· 10 10 11 11 struct macb_platform_data { 12 12 u32 phy_mask; 13 - u8 phy_irq_pin; /* PHY IRQ */ 13 + int phy_irq_pin; /* PHY IRQ */ 14 14 u8 is_rmii; /* using RMII interface? */ 15 15 }; 16 16