mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: <cw00.choi@samsung.com>, <myungjoo.ham@samsung.com>
Cc: <grygorii.strashko@ti.com>, <linux-kernel@vger.kernel.org>,
	Roger Quadros <rogerq@ti.com>
Subject: [PATCH 2/2] extcon: palmas: Don't miss GPIO events during suspend/resume
Date: Wed, 15 Feb 2017 14:31:29 +0200	[thread overview]
Message-ID: <1487161889-15550-3-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1487161889-15550-1-git-send-email-rogerq@ti.com>

The USB cable state can change during suspend/resume
so be sure to check and update the extcon state.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/extcon/extcon-palmas.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/extcon/extcon-palmas.c b/drivers/extcon/extcon-palmas.c
index 634ba70..97bacb4 100644
--- a/drivers/extcon/extcon-palmas.c
+++ b/drivers/extcon/extcon-palmas.c
@@ -408,6 +408,12 @@ static int palmas_usb_resume(struct device *dev)
 		if (palmas_usb->enable_gpio_id_detection)
 			disable_irq_wake(palmas_usb->gpio_id_irq);
 	}
+
+	/* check if GPIO states changed while suspend/resume */
+	if (palmas_usb->enable_gpio_vbus_detection)
+		palmas_vbus_irq_handler(palmas_usb->gpio_vbus_irq, palmas_usb);
+	palmas_gpio_id_detect(&palmas_usb->wq_detectid.work);
+
 	return 0;
 };
 #endif
-- 
2.7.4

  parent reply	other threads:[~2017-02-15 12:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170215123201epcas4p4715f619f0b4e6f299fa53a2adf11de5b@epcas4p4.samsung.com>
2017-02-15 12:31 ` [PATCH 0/2] extcon: palmas/usb-gpio: Don't miss " Roger Quadros
2017-02-15 12:31   ` [PATCH 1/2] extcon: usb-gpio: Don't miss event " Roger Quadros
2017-02-15 12:31   ` Roger Quadros [this message]
2017-02-16  1:42   ` [PATCH 0/2] extcon: palmas/usb-gpio: Don't miss events " Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487161889-15550-3-git-send-email-rogerq@ti.com \
    --to=rogerq@ti.com \
    --cc=cw00.choi@samsung.com \
    --cc=grygorii.strashko@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®