Simplify things by making the S3CMCI driver just use slot GPIO with descriptors instead of passing around the global GPIO numbers that we want to get rid of. Getting the names of the GPIO chips into the machine descriptor tables was a bit of a challenge but I think I have them right. The platform data supports passing in inversion flags, but no platform is using them, and it is highly unlikely that we will add more, so drop them. The long term plan is to let the inversion flags on the GPIO machine descriptor do the job. The lines are flagged as GPIO_ACTIVE_[LOW|HIGH] as that is what they are, and since we can now rely on the descriptors to have the right polarity, we set the "override_active_level" to false in mmc_gpiod_request_cd() and mmc_gpiod_request_ro().
Showing the changes to include/linux/platform_data (1 of 7 files). Show all
Unified · Split
| @@ -7,7 +7,6 @@ · 6 unmodified lines | |||
| 7 | * @no_wprotect: Set this to indicate there is no write-protect switch. | 7 | * @no_wprotect: Set this to indicate there is no write-protect switch. |
| 8 | * @no_detect: Set this if there is no detect switch. | 8 | * @no_detect: Set this if there is no detect switch. |
| 9 | * @wprotect_invert: Invert the default sense of the write protect switch. | 9 | * @wprotect_invert: Invert the default sense of the write protect switch. |
| 10 | * @detect_invert: Invert the default sense of the write protect switch. | ||
| 11 | * @use_dma: Set to allow the use of DMA. | 10 | * @use_dma: Set to allow the use of DMA. |
| 12 | * @gpio_detect: GPIO number for the card detect line. | 11 | * @gpio_detect: GPIO number for the card detect line. |
| 13 | * @gpio_wprotect: GPIO number for the write protect line. | 12 | * @gpio_wprotect: GPIO number for the write protect line. |
| @@ -31,11 +30,8 @@ struct s3c24xx_mci_pdata { · 17 unmodified lines | |||
| 31 | unsigned int no_wprotect:1; | 30 | unsigned int no_wprotect:1; |
| 32 | unsigned int no_detect:1; | 31 | unsigned int no_detect:1; |
| 33 | unsigned int wprotect_invert:1; | 32 | unsigned int wprotect_invert:1; |
| 34 | unsigned int detect_invert:1; /* set => detect active high */ | ||
| 35 | unsigned int use_dma:1; | 33 | unsigned int use_dma:1; |
| 36 | 34 | ||
| 37 | unsigned int gpio_detect; | ||
| 38 | unsigned int gpio_wprotect; | ||
| 39 | unsigned long ocr_avail; | 35 | unsigned long ocr_avail; |
| 40 | void (*set_power)(unsigned char power_mode, | 36 | void (*set_power)(unsigned char power_mode, |
| 41 | unsigned short vdd); | 37 | unsigned short vdd); |