.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Hardware definitions for Palm LifeDrive |
---|
3 | 4 | * |
---|
.. | .. |
---|
6 | 7 | * Based on work of: |
---|
7 | 8 | * Alex Osborne <ato@meshy.org> |
---|
8 | 9 | * |
---|
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 | | - * |
---|
13 | 10 | * (find more info at www.hackndev.com) |
---|
14 | | - * |
---|
15 | 11 | */ |
---|
16 | 12 | |
---|
17 | 13 | #include <linux/platform_device.h> |
---|
.. | .. |
---|
288 | 284 | .id = -1, |
---|
289 | 285 | }; |
---|
290 | 286 | |
---|
| 287 | +static struct gpiod_lookup_table palmld_ide_gpio_table = { |
---|
| 288 | + .dev_id = "pata_palmld", |
---|
| 289 | + .table = { |
---|
| 290 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_IDE_PWEN, |
---|
| 291 | + "power", GPIO_ACTIVE_HIGH), |
---|
| 292 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_IDE_RESET, |
---|
| 293 | + "reset", GPIO_ACTIVE_LOW), |
---|
| 294 | + { }, |
---|
| 295 | + }, |
---|
| 296 | +}; |
---|
| 297 | + |
---|
291 | 298 | static void __init palmld_ide_init(void) |
---|
292 | 299 | { |
---|
| 300 | + gpiod_add_lookup_table(&palmld_ide_gpio_table); |
---|
293 | 301 | platform_device_register(&palmld_ide_device); |
---|
294 | 302 | } |
---|
295 | 303 | #else |
---|
.. | .. |
---|
320 | 328 | iotable_init(palmld_io_desc, ARRAY_SIZE(palmld_io_desc)); |
---|
321 | 329 | } |
---|
322 | 330 | |
---|
| 331 | +static struct gpiod_lookup_table palmld_mci_gpio_table = { |
---|
| 332 | + .dev_id = "pxa2xx-mci.0", |
---|
| 333 | + .table = { |
---|
| 334 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_DETECT_N, |
---|
| 335 | + "cd", GPIO_ACTIVE_LOW), |
---|
| 336 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_READONLY, |
---|
| 337 | + "wp", GPIO_ACTIVE_LOW), |
---|
| 338 | + GPIO_LOOKUP("gpio-pxa", GPIO_NR_PALMLD_SD_POWER, |
---|
| 339 | + "power", GPIO_ACTIVE_HIGH), |
---|
| 340 | + { }, |
---|
| 341 | + }, |
---|
| 342 | +}; |
---|
| 343 | + |
---|
323 | 344 | static void __init palmld_init(void) |
---|
324 | 345 | { |
---|
325 | 346 | pxa2xx_mfp_config(ARRAY_AND_SIZE(palmld_pin_config)); |
---|
.. | .. |
---|
327 | 348 | pxa_set_btuart_info(NULL); |
---|
328 | 349 | pxa_set_stuart_info(NULL); |
---|
329 | 350 | |
---|
330 | | - palm27x_mmc_init(GPIO_NR_PALMLD_SD_DETECT_N, GPIO_NR_PALMLD_SD_READONLY, |
---|
331 | | - GPIO_NR_PALMLD_SD_POWER, 0); |
---|
| 351 | + palm27x_mmc_init(&palmld_mci_gpio_table); |
---|
332 | 352 | palm27x_pm_init(PALMLD_STR_BASE); |
---|
333 | 353 | palm27x_lcd_init(-1, &palm_320x480_lcd_mode); |
---|
334 | 354 | palm27x_irda_init(GPIO_NR_PALMLD_IR_DISABLE); |
---|