.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/z2.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * |
---|
8 | 9 | * Based on research and code by: Ken McGuire |
---|
9 | 10 | * Based on mainstone.c as modified for the Zipit Z2. |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License version 2 as |
---|
13 | | - * published by the Free Software Foundation. |
---|
14 | 11 | */ |
---|
15 | 12 | |
---|
16 | 13 | #include <linux/platform_device.h> |
---|
.. | .. |
---|
27 | 24 | #include <linux/power_supply.h> |
---|
28 | 25 | #include <linux/mtd/physmap.h> |
---|
29 | 26 | #include <linux/gpio.h> |
---|
| 27 | +#include <linux/gpio/machine.h> |
---|
30 | 28 | #include <linux/gpio_keys.h> |
---|
31 | 29 | #include <linux/delay.h> |
---|
32 | 30 | #include <linux/regulator/machine.h> |
---|
.. | .. |
---|
212 | 210 | /* Keypad Backlight */ |
---|
213 | 211 | .max_brightness = 1023, |
---|
214 | 212 | .dft_brightness = 0, |
---|
215 | | - .enable_gpio = -1, |
---|
216 | 213 | }, |
---|
217 | 214 | [1] = { |
---|
218 | 215 | /* LCD Backlight */ |
---|
219 | 216 | .max_brightness = 1023, |
---|
220 | 217 | .dft_brightness = 512, |
---|
221 | | - .enable_gpio = -1, |
---|
222 | 218 | }, |
---|
223 | 219 | }; |
---|
224 | 220 | |
---|
.. | .. |
---|
290 | 286 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
---|
291 | 287 | static struct pxamci_platform_data z2_mci_platform_data = { |
---|
292 | 288 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
---|
293 | | - .gpio_card_detect = GPIO96_ZIPITZ2_SD_DETECT, |
---|
294 | | - .gpio_power = -1, |
---|
295 | | - .gpio_card_ro = -1, |
---|
296 | 289 | .detect_delay_ms = 200, |
---|
| 290 | +}; |
---|
| 291 | + |
---|
| 292 | +static struct gpiod_lookup_table z2_mci_gpio_table = { |
---|
| 293 | + .dev_id = "pxa2xx-mci.0", |
---|
| 294 | + .table = { |
---|
| 295 | + GPIO_LOOKUP("gpio-pxa", GPIO96_ZIPITZ2_SD_DETECT, |
---|
| 296 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 297 | + { }, |
---|
| 298 | + }, |
---|
297 | 299 | }; |
---|
298 | 300 | |
---|
299 | 301 | static void __init z2_mmc_init(void) |
---|
300 | 302 | { |
---|
| 303 | + gpiod_add_lookup_table(&z2_mci_gpio_table); |
---|
301 | 304 | pxa_set_mci_info(&z2_mci_platform_data); |
---|
302 | 305 | } |
---|
303 | 306 | #else |
---|
.. | .. |
---|
599 | 602 | }, |
---|
600 | 603 | }; |
---|
601 | 604 | |
---|
602 | | -static struct pxa2xx_spi_master pxa_ssp1_master_info = { |
---|
| 605 | +static struct pxa2xx_spi_controller pxa_ssp1_master_info = { |
---|
603 | 606 | .num_chipselect = 1, |
---|
604 | 607 | .enable_dma = 1, |
---|
605 | 608 | }; |
---|
606 | 609 | |
---|
607 | | -static struct pxa2xx_spi_master pxa_ssp2_master_info = { |
---|
| 610 | +static struct pxa2xx_spi_controller pxa_ssp2_master_info = { |
---|
608 | 611 | .num_chipselect = 1, |
---|
609 | 612 | }; |
---|
610 | 613 | |
---|