.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * linux/arch/arm/mach-sa1100/generic.c |
---|
3 | 4 | * |
---|
4 | 5 | * Author: Nicolas Pitre |
---|
5 | 6 | * |
---|
6 | 7 | * Code common to all SA11x0 machines. |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify |
---|
9 | | - * it under the terms of the GNU General Public License version 2 as |
---|
10 | | - * published by the Free Software Foundation. |
---|
11 | 8 | */ |
---|
12 | 9 | #include <linux/gpio.h> |
---|
13 | 10 | #include <linux/gpio/machine.h> |
---|
.. | .. |
---|
235 | 232 | sa11x0_register_device(&sa11x0fb_device, inf); |
---|
236 | 233 | } |
---|
237 | 234 | |
---|
238 | | -static bool sa11x0pcmcia_legacy = true; |
---|
239 | | -static struct platform_device sa11x0pcmcia_device = { |
---|
240 | | - .name = "sa11x0-pcmcia", |
---|
241 | | - .id = -1, |
---|
242 | | -}; |
---|
243 | | - |
---|
244 | 235 | void sa11x0_register_pcmcia(int socket, struct gpiod_lookup_table *table) |
---|
245 | 236 | { |
---|
246 | 237 | if (table) |
---|
247 | 238 | gpiod_add_lookup_table(table); |
---|
248 | 239 | platform_device_register_simple("sa11x0-pcmcia", socket, NULL, 0); |
---|
249 | | - sa11x0pcmcia_legacy = false; |
---|
250 | 240 | } |
---|
251 | 241 | |
---|
252 | 242 | static struct platform_device sa11x0mtd_device = { |
---|
.. | .. |
---|
331 | 321 | { |
---|
332 | 322 | pm_power_off = sa1100_power_off; |
---|
333 | 323 | |
---|
334 | | - if (sa11x0pcmcia_legacy) |
---|
335 | | - platform_device_register(&sa11x0pcmcia_device); |
---|
336 | | - |
---|
337 | 324 | regulator_has_full_constraints(); |
---|
338 | 325 | |
---|
339 | 326 | return platform_add_devices(sa11x0_devices, ARRAY_SIZE(sa11x0_devices)); |
---|
.. | .. |
---|
348 | 335 | |
---|
349 | 336 | int __init sa11x0_register_fixed_regulator(int n, |
---|
350 | 337 | struct fixed_voltage_config *cfg, |
---|
351 | | - struct regulator_consumer_supply *supplies, unsigned num_supplies) |
---|
| 338 | + struct regulator_consumer_supply *supplies, unsigned num_supplies, |
---|
| 339 | + bool uses_gpio) |
---|
352 | 340 | { |
---|
353 | 341 | struct regulator_init_data *id; |
---|
354 | 342 | |
---|
.. | .. |
---|
356 | 344 | if (!cfg->init_data) |
---|
357 | 345 | return -ENOMEM; |
---|
358 | 346 | |
---|
359 | | - if (cfg->gpio < 0) |
---|
| 347 | + if (!uses_gpio) |
---|
360 | 348 | id->constraints.always_on = 1; |
---|
361 | 349 | id->constraints.name = cfg->supply_name; |
---|
362 | 350 | id->constraints.min_uV = cfg->microvolts; |
---|