.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/poodle.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Based on: |
---|
7 | 8 | * linux/arch/arm/mach-pxa/lubbock.c Author: Nicolas Pitre |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 as |
---|
11 | | - * published by the Free Software Foundation. |
---|
12 | 9 | * |
---|
13 | 10 | * Change Log |
---|
14 | 11 | * 12-Dec-2002 Sharp Corporation for Poodle |
---|
.. | .. |
---|
23 | 20 | #include <linux/delay.h> |
---|
24 | 21 | #include <linux/mtd/physmap.h> |
---|
25 | 22 | #include <linux/gpio.h> |
---|
| 23 | +#include <linux/gpio/machine.h> |
---|
26 | 24 | #include <linux/i2c.h> |
---|
27 | 25 | #include <linux/platform_data/i2c-pxa.h> |
---|
28 | 26 | #include <linux/regulator/machine.h> |
---|
.. | .. |
---|
195 | 193 | EXPORT_SYMBOL(poodle_locomo_device); |
---|
196 | 194 | |
---|
197 | 195 | #if defined(CONFIG_SPI_PXA2XX) || defined(CONFIG_SPI_PXA2XX_MODULE) |
---|
198 | | -static struct pxa2xx_spi_master poodle_spi_info = { |
---|
| 196 | +static struct pxa2xx_spi_controller poodle_spi_info = { |
---|
199 | 197 | .num_chipselect = 1, |
---|
200 | 198 | }; |
---|
201 | 199 | |
---|
.. | .. |
---|
288 | 286 | .init = poodle_mci_init, |
---|
289 | 287 | .setpower = poodle_mci_setpower, |
---|
290 | 288 | .exit = poodle_mci_exit, |
---|
291 | | - .gpio_card_detect = POODLE_GPIO_nSD_DETECT, |
---|
292 | | - .gpio_card_ro = POODLE_GPIO_nSD_WP, |
---|
293 | | - .gpio_power = -1, |
---|
294 | 289 | }; |
---|
295 | 290 | |
---|
| 291 | +static struct gpiod_lookup_table poodle_mci_gpio_table = { |
---|
| 292 | + .dev_id = "pxa2xx-mci.0", |
---|
| 293 | + .table = { |
---|
| 294 | + GPIO_LOOKUP("gpio-pxa", POODLE_GPIO_nSD_DETECT, |
---|
| 295 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 296 | + GPIO_LOOKUP("gpio-pxa", POODLE_GPIO_nSD_WP, |
---|
| 297 | + "wp", GPIO_ACTIVE_LOW), |
---|
| 298 | + { }, |
---|
| 299 | + }, |
---|
| 300 | +}; |
---|
296 | 301 | |
---|
297 | 302 | /* |
---|
298 | 303 | * Irda |
---|
.. | .. |
---|
439 | 444 | |
---|
440 | 445 | pxa_set_fb_info(&poodle_locomo_device.dev, &poodle_fb_info); |
---|
441 | 446 | pxa_set_udc_info(&udc_info); |
---|
| 447 | + gpiod_add_lookup_table(&poodle_mci_gpio_table); |
---|
442 | 448 | pxa_set_mci_info(&poodle_mci_platform_data); |
---|
443 | 449 | pxa_set_ficp_info(&poodle_ficp_platform_data); |
---|
444 | 450 | pxa_set_i2c_info(NULL); |
---|