Skip to content

Commit bdacbce

Browse files
Russ Dilltmlind
authored andcommitted
ARM: OMAP2+: smsc911x: Remove regulator support from gmpc-smsc911x
Adding in support for regulators here creates several headaches. - Boards that declare their own regulator cannot use this function. - Multiple calls to this function require special handling. - Boards that declare id's other than '0' need special handling. Now that there is a simple regulator_register_fixed, we can push this registration back into the board files. Signed-off-by: Russ Dill <russ.dill@ti.com> Tested-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Tony Lindgren <tony@atomide.com>
1 parent a297068 commit bdacbce

1 file changed

Lines changed: 0 additions & 55 deletions

File tree

‎arch/arm/mach-omap2/gpmc-smsc911x.c‎

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include <linux/interrupt.h>
2020
#include <linux/io.h>
2121
#include <linux/smsc911x.h>
22-
#include <linux/regulator/fixed.h>
23-
#include <linux/regulator/machine.h>
2422

2523
#include <plat/board.h>
2624
#include <plat/gpmc.h>
@@ -41,50 +39,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = {
4139
.irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN,
4240
};
4341

44-
static struct regulator_consumer_supply gpmc_smsc911x_supply[] = {
45-
REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
46-
REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
47-
};
48-
49-
/* Generic regulator definition to satisfy smsc911x */
50-
static struct regulator_init_data gpmc_smsc911x_reg_init_data = {
51-
.constraints = {
52-
.min_uV = 3300000,
53-
.max_uV = 3300000,
54-
.valid_modes_mask = REGULATOR_MODE_NORMAL
55-
| REGULATOR_MODE_STANDBY,
56-
.valid_ops_mask = REGULATOR_CHANGE_MODE
57-
| REGULATOR_CHANGE_STATUS,
58-
},
59-
.num_consumer_supplies = ARRAY_SIZE(gpmc_smsc911x_supply),
60-
.consumer_supplies = gpmc_smsc911x_supply,
61-
};
62-
63-
static struct fixed_voltage_config gpmc_smsc911x_fixed_reg_data = {
64-
.supply_name = "gpmc_smsc911x",
65-
.microvolts = 3300000,
66-
.gpio = -EINVAL,
67-
.startup_delay = 0,
68-
.enable_high = 0,
69-
.enabled_at_boot = 1,
70-
.init_data = &gpmc_smsc911x_reg_init_data,
71-
};
72-
73-
/*
74-
* Platform device id of 42 is a temporary fix to avoid conflicts
75-
* with other reg-fixed-voltage devices. The real fix should
76-
* involve the driver core providing a way of dynamically
77-
* assigning a unique id on registration for platform devices
78-
* in the same name space.
79-
*/
80-
static struct platform_device gpmc_smsc911x_regulator = {
81-
.name = "reg-fixed-voltage",
82-
.id = 42,
83-
.dev = {
84-
.platform_data = &gpmc_smsc911x_fixed_reg_data,
85-
},
86-
};
87-
8842
/*
8943
* Initialize smsc911x device connected to the GPMC. Note that we
9044
* assume that pin multiplexing is done in the board-*.c file,
@@ -96,15 +50,6 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *gpmc_cfg)
9650
unsigned long cs_mem_base;
9751
int ret;
9852

99-
if (!gpmc_cfg->id) {
100-
ret = platform_device_register(&gpmc_smsc911x_regulator);
101-
if (ret < 0) {
102-
pr_err("Unable to register smsc911x regulators: %d\n",
103-
ret);
104-
return;
105-
}
106-
}
107-
10853
if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
10954
pr_err("Failed to request GPMC mem region\n");
11055
return;

0 commit comments

Comments
 (0)