.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/mxm8x10.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
13 | 14 | * 2010-01-09: Edwin Peer <epeer@tmtservices.co.za> |
---|
14 | 15 | * Hennie van der Merwe <hvdmerwe@tmtservices.co.za> |
---|
15 | 16 | * rework for upstream merge |
---|
16 | | - * |
---|
17 | | - * This program is free software; you can redistribute it and/or modify |
---|
18 | | - * it under the terms of the GNU General Public License version 2 as |
---|
19 | | - * published by the Free Software Foundation. |
---|
20 | 17 | */ |
---|
21 | 18 | |
---|
22 | 19 | #include <linux/serial_8250.h> |
---|
23 | 20 | #include <linux/dm9000.h> |
---|
24 | | -#include <linux/gpio.h> |
---|
| 21 | +#include <linux/gpio/machine.h> |
---|
25 | 22 | #include <linux/platform_data/i2c-pxa.h> |
---|
26 | 23 | |
---|
27 | 24 | #include <linux/platform_data/mtd-nand-pxa3xx.h> |
---|
.. | .. |
---|
326 | 323 | static struct pxamci_platform_data mxm_8x10_mci_platform_data = { |
---|
327 | 324 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
---|
328 | 325 | .detect_delay_ms = 10, |
---|
329 | | - .gpio_card_detect = MXM_8X10_SD_nCD, |
---|
330 | | - .gpio_card_ro = MXM_8X10_SD_WP, |
---|
331 | | - .gpio_power = -1 |
---|
| 326 | +}; |
---|
| 327 | + |
---|
| 328 | +static struct gpiod_lookup_table mxm_8x10_mci_gpio_table = { |
---|
| 329 | + .dev_id = "pxa2xx-mci.0", |
---|
| 330 | + .table = { |
---|
| 331 | + /* Card detect on GPIO 72 */ |
---|
| 332 | + GPIO_LOOKUP("gpio-pxa", MXM_8X10_SD_nCD, |
---|
| 333 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 334 | + /* Write protect on GPIO 84 */ |
---|
| 335 | + GPIO_LOOKUP("gpio-pxa", MXM_8X10_SD_WP, |
---|
| 336 | + "wp", GPIO_ACTIVE_LOW), |
---|
| 337 | + { }, |
---|
| 338 | + }, |
---|
332 | 339 | }; |
---|
333 | 340 | |
---|
334 | 341 | void __init mxm_8x10_mmc_init(void) |
---|
335 | 342 | { |
---|
| 343 | + gpiod_add_lookup_table(&mxm_8x10_mci_gpio_table); |
---|
336 | 344 | pxa_set_mci_info(&mxm_8x10_mci_platform_data); |
---|
337 | 345 | } |
---|
338 | 346 | #endif |
---|