radio_ctrl: remove host_wake from wrigley driver
authorJames Wylder <james.wylder@motorola.com>
Tue, 15 Mar 2011 22:40:36 +0000 (17:40 -0500)
committerRebecca Schultz Zavin <rebecca@android.com>
Mon, 21 Mar 2011 20:56:23 +0000 (13:56 -0700)
Change-Id: I14f17eea39a4ee208b5be7b268187efe3197f619
Signed-off-by: James Wylder <james.wylder@motorola.com>
drivers/misc/radio_ctrl/wrigley_ctrl.c
include/linux/radio_ctrl/wrigley_ctrl.h

index 4e60a2bb04bcbdbc6859532f4c59682cc9118e37..1887432a31f532576d9ae75211849af9a81244b4 100644 (file)
@@ -57,10 +57,6 @@ struct wrigley_info {
        unsigned int reset_gpio;
        char reset_name[GPIO_MAX_NAME];
 
-       unsigned int host_wake_gpio;
-       char host_wake_name[GPIO_MAX_NAME];
-       struct wake_lock wake_lock;
-
        bool boot_flash;
        enum wrigley_status status;
 
@@ -212,15 +208,6 @@ static ssize_t wrigley_command(struct radio_dev *rdev, char *cmd)
        return -EINVAL;
 }
 
-static irqreturn_t wrigley_host_wake_isr(int irq, void *data)
-{
-       struct wrigley_info *info = (struct wrigley_info *) data;
-       pr_debug("%s: take wakelock\n", __func__);
-       wake_lock_timeout(&info->wake_lock, HZ / 2);
-
-       return IRQ_HANDLED;
-}
-
 static irqreturn_t wrigley_reset_fn(int irq, void *data)
 {
        struct wrigley_info *info = (struct wrigley_info *) data;
@@ -242,7 +229,7 @@ static int __devinit wrigley_probe(struct platform_device *pdev)
 {
        struct wrigley_ctrl_platform_data *pdata = pdev->dev.platform_data;
        struct wrigley_info *info;
-       int reset_irq, host_wake_irq, err = 0;
+       int reset_irq, err = 0;
 
        pr_info("%s: %s\n", __func__, dev_name(&pdev->dev));
 
@@ -259,40 +246,6 @@ static int __devinit wrigley_probe(struct platform_device *pdev)
        info->rdev.status = wrigley_status_show;
        info->rdev.command = wrigley_command;
 
-       wake_lock_init(&info->wake_lock, WAKE_LOCK_SUSPEND,
-                       dev_name(&pdev->dev));
-
-       /* host wake */
-       pr_debug("%s: setup host_wake\n", __func__);
-       info->host_wake_gpio = pdata->gpio_host_wake;
-       snprintf(info->host_wake_name, GPIO_MAX_NAME, "%s-%s",
-               dev_name(&pdev->dev), "host-wake");
-       err = gpio_request(info->host_wake_gpio, info->host_wake_name);
-       if (err) {
-               pr_err("%s: error requesting host wake gpio\n", __func__);
-               goto err_host_wake;
-       }
-       gpio_direction_input(info->host_wake_gpio);
-
-       host_wake_irq = gpio_to_irq(info->host_wake_gpio);
-       err = request_irq(host_wake_irq, wrigley_host_wake_isr,
-               IRQ_TYPE_EDGE_FALLING, info->host_wake_name, info);
-       if (err) {
-               pr_err("%s: error requesting host wake irq\n", __func__);
-               gpio_free(info->host_wake_gpio);
-               goto err_host_wake;
-       }
-
-       err = enable_irq_wake(host_wake_irq);
-       if (err) {
-               pr_err("%s: request host_wake irq (%d) %s failed\n",
-                       __func__, host_wake_irq, info->host_wake_name);
-               free_irq(host_wake_irq, info);
-               gpio_free(info->host_wake_gpio);
-               goto err_host_wake;
-       }
-       gpio_export(info->host_wake_gpio, false);
-
        /* disable */
        pr_debug("%s: setup wrigley_disable\n", __func__);
        info->disable_gpio = pdata->gpio_disable;
@@ -369,11 +322,6 @@ err_flash:
 err_reset:
        gpio_free(info->disable_gpio);
 err_disable:
-       disable_irq_wake(host_wake_irq);
-       free_irq(host_wake_irq, info);
-       gpio_free(info->host_wake_gpio);
-err_host_wake:
-       wake_lock_destroy(&info->wake_lock);
        platform_set_drvdata(pdev, NULL);
        kfree(info);
 err_exit:
@@ -405,12 +353,6 @@ static int __devexit wrigley_remove(struct platform_device *pdev)
        /* disable */
        gpio_free(info->disable_gpio);
 
-       /* host_wake */
-       disable_irq_wake(gpio_to_irq(info->host_wake_gpio));
-       free_irq(gpio_to_irq(info->host_wake_gpio), info);
-       gpio_free(info->host_wake_gpio);
-       wake_lock_destroy(&info->wake_lock);
-
        platform_set_drvdata(pdev, NULL);
        kfree(info);
 
index 770f055d8efbfb0cc86b5286d6e1c33e618b9168..53f7e6f7b1fccf951ed6f038c42969222f1ce0c1 100644 (file)
@@ -19,7 +19,6 @@
 #define __LINUX_WRIGLEY_CTRL_H__
 
 struct wrigley_ctrl_platform_data {
-       unsigned int gpio_host_wake;
        unsigned int gpio_disable;
        unsigned int gpio_reset;
        unsigned int gpio_force_flash;