All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure path
@ 2017-03-30 14:37 Xinming Hu
  2017-03-30 14:37 ` [PATCH v2 2/2] Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check Xinming Hu
  0 siblings, 1 reply; 4+ messages in thread
From: Xinming Hu @ 2017-03-30 14:37 UTC (permalink / raw)
  To: Linux Bluetooth
  Cc: Marcel Holtmann, Amitkumar Karwar, Cathy Luo, Xinming Hu, Guenter Roeck

Host sleep handshake with device might been fail, disable platform wakeup
interrupt in this case.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
v2: same as v1
---
 drivers/bluetooth/btmrvl_sdio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 2424ea2..95e40ec 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -1630,6 +1630,13 @@ static int btmrvl_sdio_suspend(struct device *dev)
 	if (priv->adapter->hs_state != HS_ACTIVATED) {
 		if (btmrvl_enable_hs(priv)) {
 			BT_ERR("HS not activated, suspend failed!");
+			/* Disable platform specific wakeup interrupt */
+			if (card->plt_wake_cfg &&
+			    card->plt_wake_cfg->irq_bt >= 0) {
+				disable_irq_wake(card->plt_wake_cfg->irq_bt);
+				disable_irq(card->plt_wake_cfg->irq_bt);
+			}
+
 			priv->adapter->is_suspending = false;
 			return -EBUSY;
 		}
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2 2/2] Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check
  2017-03-30 14:37 [PATCH v2 1/2] Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure path Xinming Hu
@ 2017-03-30 14:37 ` Xinming Hu
  2017-03-30 14:44   ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: Xinming Hu @ 2017-03-30 14:37 UTC (permalink / raw)
  To: Linux Bluetooth
  Cc: Marcel Holtmann, Amitkumar Karwar, Cathy Luo, Xinming Hu, Guenter Roeck

Sanity check of interrupt number in interrupt handler is unnecessary and
confusion, remove it.

Signed-off-by: Xinming Hu <huxm@marvell.com>
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
v2: fix apply error in v1
---
 drivers/bluetooth/btmrvl_sdio.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 95e40ec..eb794f0 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -64,11 +64,9 @@ static irqreturn_t btmrvl_wake_irq_bt(int irq, void *priv)
 	struct btmrvl_sdio_card *card = priv;
 	struct btmrvl_plt_wake_cfg *cfg = card->plt_wake_cfg;
 
-	if (cfg->irq_bt >= 0) {
-		pr_info("%s: wake by bt", __func__);
-		cfg->wake_by_bt = true;
-		disable_irq_nosync(irq);
-	}
+	pr_info("%s: wake by bt", __func__);
+	cfg->wake_by_bt = true;
+	disable_irq_nosync(irq);
 
 	pm_wakeup_event(&card->func->dev, 0);
 	pm_system_wakeup();
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check
  2017-03-30 14:37 ` [PATCH v2 2/2] Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check Xinming Hu
@ 2017-03-30 14:44   ` Marcel Holtmann
  2017-03-31  6:31     ` Xinming Hu
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2017-03-30 14:44 UTC (permalink / raw)
  To: Xinming Hu; +Cc: Linux Bluetooth, Amitkumar Karwar, Cathy Luo, Guenter Roeck

Hi Xinming,

> Sanity check of interrupt number in interrupt handler is unnecessary and
> confusion, remove it.
> 
> Signed-off-by: Xinming Hu <huxm@marvell.com>
> Signed-off-by: Guenter Roeck <groeck@chromium.org>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> ---
> v2: fix apply error in v1
> ---
> drivers/bluetooth/btmrvl_sdio.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 2/2] Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check
  2017-03-30 14:44   ` Marcel Holtmann
@ 2017-03-31  6:31     ` Xinming Hu
  0 siblings, 0 replies; 4+ messages in thread
From: Xinming Hu @ 2017-03-31  6:31 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: Linux Bluetooth, Amitkumar Karwar, Cathy Luo, Guenter Roeck

Hi Marcel,=0A=
________________________________________=0A=
=0A=
=0A=
>Hi Xinming,=0A=
=0A=
>> Sanity check of interrupt number in interrupt handler is unnecessary and=
=0A=
>> confusion, remove it.=0A=
>>=0A=
>> Signed-off-by: Xinming Hu <huxm@marvell.com>=0A=
>> Signed-off-by: Guenter Roeck <groeck@chromium.org>=0A=
>> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>=0A=
>> ---=0A=
>> v2: fix apply error in v1=0A=
>> ---=0A=
>> drivers/bluetooth/btmrvl_sdio.c | 8 +++-----=0A=
>> 1 file changed, 3 insertions(+), 5 deletions(-)=0A=
=0A=
>patch has been applied to bluetooth-next tree.=0A=
=0A=
Thanks ! we might need send V3 patches based on Guenter's comments.=0A=
=0A=
Regards,=0A=
Simon=0A=
=0A=
>Regards=0A=
=0A=
>Marcel=0A=
=0A=

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-03-31  6:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30 14:37 [PATCH v2 1/2] Bluetooth: btmrvl: disable platform wakeup interrupt in suspend failure path Xinming Hu
2017-03-30 14:37 ` [PATCH v2 2/2] Bluetooth: btmrvl: remove unnecessary wakeup interrupt number sanity check Xinming Hu
2017-03-30 14:44   ` Marcel Holtmann
2017-03-31  6:31     ` Xinming Hu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.