History

mmc: s3cmci: Use the slot GPIO descriptor

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().

Linus Walleij committed 7 years ago

Commit d2951df1 parent faed9307 files · +75 −32Browse files

Showing the changes to include/linux/platform_data (1 of 7 files). Show all

Unified · Split

include/linux/platform_data/mmc-s3cmci.h+0−4
@@ -7,7 +7,6 @@ · 6 unmodified lines
77 * @no_wprotect: Set this to indicate there is no write-protect switch.
88 * @no_detect: Set this if there is no detect switch.
99 * @wprotect_invert: Invert the default sense of the write protect switch.
10− * @detect_invert: Invert the default sense of the write protect switch.
1110 * @use_dma: Set to allow the use of DMA.
1211 * @gpio_detect: GPIO number for the card detect line.
1312 * @gpio_wprotect: GPIO number for the write protect line.
@@ -31,11 +30,8 @@ struct s3c24xx_mci_pdata { · 17 unmodified lines
3130 unsigned int no_wprotect:1;
3231 unsigned int no_detect:1;
3332 unsigned int wprotect_invert:1;
34− unsigned int detect_invert:1; /* set => detect active high */
3533 unsigned int use_dma:1;
3634
37− unsigned int gpio_detect;
38− unsigned int gpio_wprotect;
3935 unsigned long ocr_avail;
4036 void (*set_power)(unsigned char power_mode,
4137 unsigned short vdd);