sensors: brcm: Remove wake_lock to fix the suspend issue 77/143477/1
authorChanwoo Choi <cw00.choi@samsung.com>
Thu, 10 Aug 2017 05:33:47 +0000 (14:33 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Thu, 10 Aug 2017 05:33:47 +0000 (14:33 +0900)
Even if TM2 doesn't use the wake_lock feature, the brcm sensor
drivers used the wake_lock and the the count of GPS interrupt
of brcm sensor is too much. The too much interrupt causes the
pending of reading the 'sys/power/wakeup_count' and then failed
to enter the suspend state by user-process.

This patch removes the wake_lock code to fix the suspend issue.

Change-Id: Ibd161a7a53adc4398f145e482a90efa35febbdb6
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
drivers/sensors/brcm/bbdpl2/bcm_gps_spi.c

index cd95f324409723d9d707745360463edeac46508b..d9479d919f583650ed742e23a0bcea95bad96291 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/irq.h>
 #include <linux/poll.h>
 #include <linux/uaccess.h>
-#include <linux/wakelock.h>
 #include <linux/suspend.h>
 #include <linux/kernel.h>
 #include <linux/clk.h>
@@ -125,8 +124,6 @@ struct bcm_spi_priv
        struct bcm_ssi_tx_frame *tx_buf;
        struct bcm_ssi_rx_frame *rx_buf;
 
-       struct wake_lock bcm_wake_lock;
-
        struct clk *clk;
 };
 
@@ -633,7 +630,6 @@ static irqreturn_t bcm_irq_handler(int irq, void *pdata)
        if (!atomic_read(&priv->suspending))
                queue_work(priv->serial_wq, &priv->rxtx_work);
 
-       wake_lock_timeout(&priv->bcm_wake_lock, HZ/2);
        return IRQ_HANDLED;
 }
 
@@ -806,9 +802,6 @@ static int bcm_spi_probe(struct spi_device *spi)
        priv->mcu_req  = mcu_req;
        priv->mcu_resp = mcu_resp;
 
-       /* Init - etc */
-       wake_lock_init(&priv->bcm_wake_lock, WAKE_LOCK_SUSPEND, "bcm_spi_wake_lock");
-
        g_bcm_gps = priv;
        /* Init BBD & SSP */
        bbd_init(&spi->dev);