.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-pxa/income.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Copyright (C) 2010 |
---|
7 | 8 | * Marek Vasut <marek.vasut@gmail.com> |
---|
8 | 9 | * Pavel Revak <palo@bielyvlk.sk> |
---|
9 | | - * |
---|
10 | | - * This program is free software; you can redistribute it and/or modify |
---|
11 | | - * it under the terms of the GNU General Public License version 2 as |
---|
12 | | - * published by the Free Software Foundation. |
---|
13 | 10 | */ |
---|
14 | 11 | |
---|
15 | 12 | #include <linux/bitops.h> |
---|
16 | 13 | #include <linux/delay.h> |
---|
17 | | -#include <linux/gpio.h> |
---|
| 14 | +#include <linux/gpio/machine.h> |
---|
18 | 15 | #include <linux/init.h> |
---|
19 | 16 | #include <linux/interrupt.h> |
---|
20 | 17 | #include <linux/leds.h> |
---|
.. | .. |
---|
51 | 48 | #if defined(CONFIG_MMC_PXA) || defined(CONFIG_MMC_PXA_MODULE) |
---|
52 | 49 | static struct pxamci_platform_data income_mci_platform_data = { |
---|
53 | 50 | .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, |
---|
54 | | - .gpio_power = -1, |
---|
55 | | - .gpio_card_detect = GPIO0_INCOME_SD_DETECT, |
---|
56 | | - .gpio_card_ro = GPIO0_INCOME_SD_RO, |
---|
57 | 51 | .detect_delay_ms = 200, |
---|
| 52 | +}; |
---|
| 53 | + |
---|
| 54 | +static struct gpiod_lookup_table income_mci_gpio_table = { |
---|
| 55 | + .dev_id = "pxa2xx-mci.0", |
---|
| 56 | + .table = { |
---|
| 57 | + /* Card detect on GPIO 0 */ |
---|
| 58 | + GPIO_LOOKUP("gpio-pxa", GPIO0_INCOME_SD_DETECT, |
---|
| 59 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 60 | + /* Write protect on GPIO 1 */ |
---|
| 61 | + GPIO_LOOKUP("gpio-pxa", GPIO0_INCOME_SD_RO, |
---|
| 62 | + "wp", GPIO_ACTIVE_LOW), |
---|
| 63 | + { }, |
---|
| 64 | + }, |
---|
58 | 65 | }; |
---|
59 | 66 | |
---|
60 | 67 | static void __init income_mmc_init(void) |
---|
61 | 68 | { |
---|
| 69 | + gpiod_add_lookup_table(&income_mci_gpio_table); |
---|
62 | 70 | pxa_set_mci_info(&income_mci_platform_data); |
---|
63 | 71 | } |
---|
64 | 72 | #else |
---|
.. | .. |
---|
194 | 202 | static struct platform_pwm_backlight_data income_backlight_data = { |
---|
195 | 203 | .max_brightness = 0x3ff, |
---|
196 | 204 | .dft_brightness = 0x1ff, |
---|
197 | | - .enable_gpio = -1, |
---|
198 | 205 | }; |
---|
199 | 206 | |
---|
200 | 207 | static struct platform_device income_backlight = { |
---|