aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-08-21 10:54:05 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-09-26 05:07:40 -0400
commit16b246ac50181c49e34e2846f4227cf8ad4d39c8 (patch)
treef88cdd96b27e1dcff5d8fe55ee3f699e726ef880 /arch
parentb5cbc510d5ef2433d8b23d11ce2e9e959411d00e (diff)
ARM: ux500: Purge SFH7741 Proximity Sensor support when booting with ATAGs
It's time to remove all ATAG support from ux500 and rely solely on Device Tree booting. This patch is part of that endeavour. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 94df003aea4b..7109b3f21a63 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -30,7 +30,6 @@
30#include <linux/mfd/abx500/ab8500-gpio.h> 30#include <linux/mfd/abx500/ab8500-gpio.h>
31#include <linux/platform_data/leds-lp55xx.h> 31#include <linux/platform_data/leds-lp55xx.h>
32#include <linux/input.h> 32#include <linux/input.h>
33#include <linux/gpio_keys.h>
34#include <linux/delay.h> 33#include <linux/delay.h>
35#include <linux/leds.h> 34#include <linux/leds.h>
36#include <linux/pinctrl/consumer.h> 35#include <linux/pinctrl/consumer.h>
@@ -62,59 +61,6 @@ static void __init mop500_i2c_init(struct device *parent)
62 db8500_add_i2c3(parent, NULL); 61 db8500_add_i2c3(parent, NULL);
63} 62}
64 63
65static struct gpio_keys_button mop500_gpio_keys[] = {
66 {
67 .desc = "SFH7741 Proximity Sensor",
68 .type = EV_SW,
69 .code = SW_FRONT_PROXIMITY,
70 .active_low = 0,
71 .can_disable = 1,
72 }
73};
74
75static struct regulator *prox_regulator;
76static int mop500_prox_activate(struct device *dev);
77static void mop500_prox_deactivate(struct device *dev);
78
79static struct gpio_keys_platform_data mop500_gpio_keys_data = {
80 .buttons = mop500_gpio_keys,
81 .nbuttons = ARRAY_SIZE(mop500_gpio_keys),
82 .enable = mop500_prox_activate,
83 .disable = mop500_prox_deactivate,
84};
85
86static struct platform_device mop500_gpio_keys_device = {
87 .name = "gpio-keys",
88 .id = 0,
89 .dev = {
90 .platform_data = &mop500_gpio_keys_data,
91 },
92};
93
94static int mop500_prox_activate(struct device *dev)
95{
96 prox_regulator = regulator_get(&mop500_gpio_keys_device.dev,
97 "vcc");
98 if (IS_ERR(prox_regulator)) {
99 dev_err(&mop500_gpio_keys_device.dev,
100 "no regulator\n");
101 return PTR_ERR(prox_regulator);
102 }
103
104 return regulator_enable(prox_regulator);
105}
106
107static void mop500_prox_deactivate(struct device *dev)
108{
109 regulator_disable(prox_regulator);
110 regulator_put(prox_regulator);
111}
112
113/* add any platform devices here - TODO */
114static struct platform_device *mop500_platform_devs[] __initdata = {
115 &mop500_gpio_keys_device,
116};
117
118#ifdef CONFIG_STE_DMA40 64#ifdef CONFIG_STE_DMA40
119static struct stedma40_chan_cfg ssp0_dma_cfg_rx = { 65static struct stedma40_chan_cfg ssp0_dma_cfg_rx = {
120 .mode = STEDMA40_MODE_LOGICAL, 66 .mode = STEDMA40_MODE_LOGICAL,
@@ -222,20 +168,12 @@ static void __init mop500_uart_init(struct device *parent)
222static void __init mop500_init_machine(void) 168static void __init mop500_init_machine(void)
223{ 169{
224 struct device *parent = NULL; 170 struct device *parent = NULL;
225 int i;
226 171
227 platform_device_register(&db8500_prcmu_device); 172 platform_device_register(&db8500_prcmu_device);
228 mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR;
229 173
230 mop500_pinmaps_init(); 174 mop500_pinmaps_init();
231 parent = u8500_init_devices(); 175 parent = u8500_init_devices();
232 176
233 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
234 mop500_platform_devs[i]->dev.parent = parent;
235
236 platform_add_devices(mop500_platform_devs,
237 ARRAY_SIZE(mop500_platform_devs));
238
239 mop500_i2c_init(parent); 177 mop500_i2c_init(parent);
240 mop500_sdi_init(parent); 178 mop500_sdi_init(parent);
241 mop500_spi_init(parent); 179 mop500_spi_init(parent);
@@ -267,25 +205,12 @@ static void __init snowball_init_machine(void)
267static void __init hrefv60_init_machine(void) 205static void __init hrefv60_init_machine(void)
268{ 206{
269 struct device *parent = NULL; 207 struct device *parent = NULL;
270 int i;
271 208
272 platform_device_register(&db8500_prcmu_device); 209 platform_device_register(&db8500_prcmu_device);
273 /*
274 * The HREFv60 board removed a GPIO expander and routed
275 * all these GPIO pins to the internal GPIO controller
276 * instead.
277 */
278 mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO;
279 210
280 hrefv60_pinmaps_init(); 211 hrefv60_pinmaps_init();
281 parent = u8500_init_devices(); 212 parent = u8500_init_devices();
282 213
283 for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++)
284 mop500_platform_devs[i]->dev.parent = parent;
285
286 platform_add_devices(mop500_platform_devs,
287 ARRAY_SIZE(mop500_platform_devs));
288
289 mop500_i2c_init(parent); 214 mop500_i2c_init(parent);
290 hrefv60_sdi_init(parent); 215 hrefv60_sdi_init(parent);
291 mop500_spi_init(parent); 216 mop500_spi_init(parent);