summaryrefslogtreecommitdiff
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
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));