[ARM] pxa: factor pxamci gpio handling
Several boards use always the same pattern with pxamci : request gpio, request irq for that gpio to detect MMC card insertion, request gpio for read-only mode detection, etc ... Now that pxamci provides platform_data to describe simple gpio management of the MMC external controls, use it. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Cc: rpurdie@rpsys.net Cc: drwyrm@gmail.com Cc: sakoman@gmail.com Cc: marek.vasut@gmail.com Cc: s.hauer@pengutronix.de Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
This commit is contained in:

committed by
Eric Miao

parent
b405db6c01
commit
7a648256b2
@@ -646,13 +646,16 @@ static int em_x270_mci_get_ro(struct device *dev)
|
||||
}
|
||||
|
||||
static struct pxamci_platform_data em_x270_mci_platform_data = {
|
||||
.ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
|
||||
MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
|
||||
MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
|
||||
MMC_VDD_30_31|MMC_VDD_31_32,
|
||||
.init = em_x270_mci_init,
|
||||
.setpower = em_x270_mci_setpower,
|
||||
.exit = em_x270_mci_exit,
|
||||
.ocr_mask = MMC_VDD_20_21|MMC_VDD_21_22|MMC_VDD_22_23|
|
||||
MMC_VDD_24_25|MMC_VDD_25_26|MMC_VDD_26_27|
|
||||
MMC_VDD_27_28|MMC_VDD_28_29|MMC_VDD_29_30|
|
||||
MMC_VDD_30_31|MMC_VDD_31_32,
|
||||
.init = em_x270_mci_init,
|
||||
.setpower = em_x270_mci_setpower,
|
||||
.exit = em_x270_mci_exit,
|
||||
.gpio_card_detect = -1,
|
||||
.gpio_card_ro = -1,
|
||||
.gpio_power = -1,
|
||||
};
|
||||
|
||||
static void __init em_x270_init_mmc(void)
|
||||
|
Reference in New Issue
Block a user