diff options
author | Russ Dill <Russ.Dill@ti.com> | 2012-03-23 05:21:36 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-04-03 13:31:34 -0400 |
commit | bdacbce65492f54e02a97c23328ec4bbcc31554a (patch) | |
tree | bf976e208eebc55d8f05e9abdf0d988534128cfd /arch/arm | |
parent | a297068c1fa529c350e7923b85372ca3b38dcdc5 (diff) |
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/gpmc-smsc911x.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/arch/arm/mach-omap2/gpmc-smsc911x.c b/arch/arm/mach-omap2/gpmc-smsc911x.c index f9446eaf9176..b6c77be3e8f7 100644 --- a/arch/arm/mach-omap2/gpmc-smsc911x.c +++ b/arch/arm/mach-omap2/gpmc-smsc911x.c | |||
@@ -19,8 +19,6 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/io.h> | 20 | #include <linux/io.h> |
21 | #include <linux/smsc911x.h> | 21 | #include <linux/smsc911x.h> |
22 | #include <linux/regulator/fixed.h> | ||
23 | #include <linux/regulator/machine.h> | ||
24 | 22 | ||
25 | #include <plat/board.h> | 23 | #include <plat/board.h> |
26 | #include <plat/gpmc.h> | 24 | #include <plat/gpmc.h> |
@@ -41,50 +39,6 @@ static struct smsc911x_platform_config gpmc_smsc911x_config = { | |||
41 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, | 39 | .irq_type = SMSC911X_IRQ_TYPE_OPEN_DRAIN, |
42 | }; | 40 | }; |
43 | 41 | ||
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 | |||
88 | /* | 42 | /* |
89 | * Initialize smsc911x device connected to the GPMC. Note that we | 43 | * Initialize smsc911x device connected to the GPMC. Note that we |
90 | * assume that pin multiplexing is done in the board-*.c file, | 44 | * 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) | |||
96 | unsigned long cs_mem_base; | 50 | unsigned long cs_mem_base; |
97 | int ret; | 51 | int ret; |
98 | 52 | ||
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 | |||
108 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { | 53 | if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) { |
109 | pr_err("Failed to request GPMC mem region\n"); | 54 | pr_err("Failed to request GPMC mem region\n"); |
110 | return; | 55 | return; |