summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorNaga RADHESH Y <naga.radheshy@stericsson.com>2012-02-14 07:47:03 +0100
committerPhilippe Langlais <philippe.langlais@linaro.org>2012-02-15 09:35:37 +0100
commit9f6c66e59d2ee3224b45d1489e94f3b0d274204e (patch)
tree7e59ed6baffcca6747f7c7e7bfde9d77bcf0d2f3 /arch/arm/mach-ux500/board-mop500.c
parent0337d1dcb95937704fd386b1b108c6834e7843c5 (diff)
mach-ux500:Configure Proximity GPIO based on UIB
Move proximity platform data from board-mop500 to board-mop500-uib and configure the GPIO pin depending on UIB ST-Ericsson ID: 374970 ST-Ericsson Linux next: NA ST-Ericsson FOSS-OUT ID: Trivial Change-Id:Ie61cc1f24ec1c80cb2659eacd7bff6f10e9ccbea Signed-off-by: Naga Radhesh <naga.radheshy@stericsson.com>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index 8df987925da..1200db26f75 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -653,43 +653,6 @@ static void __init mop500_i2c_init(void)
db8500_add_i2c3(&u8500_i2c3_data);
}
-#ifdef CONFIG_UX500_GPIO_KEYS
-static struct gpio_keys_button mop500_gpio_keys[] = {
- {
- .desc = "SFH7741 Proximity Sensor",
- .type = EV_SW,
- .code = SW_FRONT_PROXIMITY,
- .active_low = 0,
- .can_disable = 1,
- },
- {
- .desc = "HED54XXU11 Hall Effect Sensor",
- .type = EV_SW,
- .code = SW_LID, /* FIXME arbitrary usage */
- .active_low = 0,
- .can_disable = 1,
- }
-};
-
-static struct regulator *gpio_keys_regulator;
-static int mop500_gpio_keys_activate(struct device *dev);
-static void mop500_gpio_keys_deactivate(struct device *dev);
-
-static struct gpio_keys_platform_data mop500_gpio_keys_data = {
- .buttons = mop500_gpio_keys,
- .nbuttons = ARRAY_SIZE(mop500_gpio_keys),
- .enable = mop500_gpio_keys_activate,
- .disable = mop500_gpio_keys_deactivate,
-};
-
-static struct platform_device mop500_gpio_keys_device = {
- .name = "gpio-keys",
- .id = 0,
- .dev = {
- .platform_data = &mop500_gpio_keys_data,
- },
-};
-
#ifdef CONFIG_REGULATOR_FIXED_VOLTAGE
static struct platform_device snowball_gpio_wlan_vbat_regulator_device = {
.name = "reg-fixed-voltage",
@@ -708,51 +671,6 @@ static struct platform_device snowball_gpio_en_3v3_regulator_device = {
};
#endif
-static int mop500_gpio_keys_activate(struct device *dev)
-{
- gpio_keys_regulator = regulator_get(&mop500_gpio_keys_device.dev,
- "vcc");
- if (IS_ERR(gpio_keys_regulator)) {
- dev_err(&mop500_gpio_keys_device.dev, "no regulator\n");
- return PTR_ERR(gpio_keys_regulator);
- }
- regulator_enable(gpio_keys_regulator);
-
- /*
- * Please be aware that the start-up time of the SFH7741 is
- * 120 ms and during that time the output is undefined.
- */
-
- return 0;
-}
-
-static void mop500_gpio_keys_deactivate(struct device *dev)
-{
- if (!IS_ERR(gpio_keys_regulator)) {
- regulator_disable(gpio_keys_regulator);
- regulator_put(gpio_keys_regulator);
- }
-}
-
-static __init void mop500_gpio_keys_init(void)
-{
- struct ux500_pins *gpio_keys_pins = ux500_pins_get("gpio-keys.0");
-
- if (gpio_keys_pins == NULL) {
- pr_err("gpio_keys: Fail to get pins\n");
- return;
- }
-
- ux500_pins_enable(gpio_keys_pins);
-
- mop500_gpio_keys[0].gpio = PIN_NUM(gpio_keys_pins->cfg[0]);
- mop500_gpio_keys[1].gpio = PIN_NUM(gpio_keys_pins->cfg[1]);
-
-}
-#else
-static inline void mop500_gpio_keys_init(void) { }
-#endif
-
#ifdef CONFIG_LEDS_PWM
static struct led_pwm pwm_leds_data[] = {
[0] = {
@@ -957,9 +875,6 @@ static struct platform_device *mop500_platform_devs[] __initdata = {
#ifdef CONFIG_STE_TRACE_MODEM
&u8500_trace_modem,
#endif
-#ifdef CONFIG_UX500_GPIO_KEYS
- &mop500_gpio_keys_device,
-#endif
#ifdef CONFIG_LEDS_PWM
&ux500_leds_device,
#endif
@@ -1222,7 +1137,6 @@ static void __init mop500_init_machine(void)
ARRAY_SIZE(u8500_hsi_devices));
#endif
- mop500_gpio_keys_init();
platform_add_devices(mop500_platform_devs,
ARRAY_SIZE(mop500_platform_devs));
@@ -1309,7 +1223,6 @@ static void __init hrefv60_init_machine(void)
ARRAY_SIZE(u8500_hsi_devices));
#endif
- mop500_gpio_keys_init();
platform_add_devices(mop500_platform_devs,
ARRAY_SIZE(mop500_platform_devs));