From: Vladyslav Tymoshchuk <tvlad744@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Sebastian Reichel <sre@kernel.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
Abel Vesa <abel.vesa@oss.qualcomm.com>,
Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>,
Joonhoe Kim <26rote@gmail.com>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 4/5] usb: typec: ucsi: glink: Wake up the system on connector changes
Date: Sun, 29 Nov 2026 15:44:40 +0200 [thread overview]
Message-ID: <20261129134442.579-5-tvlad744@gmail.com> (raw)
In-Reply-To: <20261129134442.579-1-tvlad744@gmail.com>
Enable wakeup on the device, so that pmic_glink reports the UCSI
notifications as wakeup events: plugging a cable in or out brings the
system out of suspend-to-idle. User space can change it through
power/wakeup.
Jishnu Prakash proposed the same [1], with the event reported from the
callback, which now runs only after the system has resumed.
Link: https://lore.kernel.org/all/20260722-ucsi_glink_wakeup-v2-1-b43dee56df24@oss.qualcomm.com/ [1]
Signed-off-by: Vladyslav Tymoshchuk <tvlad744@gmail.com>
---
drivers/usb/typec/ucsi/ucsi_glink.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/typec/ucsi/ucsi_glink.c b/drivers/usb/typec/ucsi/ucsi_glink.c
index 053571027182..a0e28ec715bd 100644
--- a/drivers/usb/typec/ucsi/ucsi_glink.c
+++ b/drivers/usb/typec/ucsi/ucsi_glink.c
@@ -7,6 +7,7 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of_device.h>
+#include <linux/pm_wakeup.h>
#include <linux/property.h>
#include <linux/soc/qcom/pdr.h>
#include <linux/usb/typec_mux.h>
@@ -462,6 +463,11 @@ static int pmic_glink_ucsi_probe(struct auxiliary_device *adev,
ucsi->port_orientation[port] = desc;
}
+ /* pmic_glink reports the notifications as wakeup events */
+ ret = devm_device_init_wakeup(dev);
+ if (ret)
+ return ret;
+
ucsi->client = devm_pmic_glink_client_alloc(dev, PMIC_GLINK_OWNER_USBC,
pmic_glink_ucsi_callback,
pmic_glink_ucsi_pdr_notify,
next prev parent reply other threads:[~2026-11-29 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 13:44 [PATCH v2 0/5] soc: qcom: pmic_glink: Deliver notifications from a freezable workqueue Vladyslav Tymoshchuk
2026-11-29 13:44 ` [PATCH v2 1/5] usb: typec: ucsi: glink: Handle a restart of the remote before the work runs Vladyslav Tymoshchuk
2026-11-29 13:44 ` [PATCH v2 2/5] soc: qcom: pmic_glink: Deliver notifications from a freezable workqueue Vladyslav Tymoshchuk
2026-11-29 13:44 ` [PATCH v2 3/5] soc: qcom: pmic_glink: Report wakeup events on behalf of clients Vladyslav Tymoshchuk
2026-11-29 13:44 ` Vladyslav Tymoshchuk [this message]
2026-11-29 13:44 ` [PATCH v2 5/5] power: supply: qcom_battmgr: Allow charger changes to wake up the system Vladyslav Tymoshchuk
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=20261129134442.579-5-tvlad744@gmail.com \
--to=tvlad744@gmail.com \
--cc=26rote@gmail.com \
--cc=abel.vesa@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jishnu.prakash@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=sre@kernel.org \
/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