[PATCH RFT] usb: typec: mux: Mark mux/switch devices as 'PM not required'

Konrad Dybcio posted 1 patch 2 months ago
drivers/usb/typec/mux.c | 4 ++++
1 file changed, 4 insertions(+)
[PATCH RFT] usb: typec: mux: Mark mux/switch devices as 'PM not required'
Posted by Konrad Dybcio 2 months ago
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

These are spawned as children of the device that normally represents
the chip/hw block providing Type-C functionality. They don't have PM
callbacks, so it makes no sense for them to be taken into account
there.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
I saw no regressions, but such changes are always a little scary..
Sending as RFT
---
 drivers/usb/typec/mux.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
index db5e4a4c0a99..080252f202ec 100644
--- a/drivers/usb/typec/mux.c
+++ b/drivers/usb/typec/mux.c
@@ -199,6 +199,8 @@ typec_switch_register(struct device *parent,
 		return ERR_PTR(ret);
 	}
 
+	device_set_pm_not_required(&sw_dev->dev);
+
 	ret = device_add(&sw_dev->dev);
 	if (ret) {
 		dev_err(parent, "failed to register switch (%d)\n", ret);
@@ -454,6 +456,8 @@ typec_mux_register(struct device *parent, const struct typec_mux_desc *desc)
 		return ERR_PTR(ret);
 	}
 
+	device_set_pm_not_required(&mux_dev->dev);
+
 	ret = device_add(&mux_dev->dev);
 	if (ret) {
 		dev_err(parent, "failed to register mux (%d)\n", ret);

---
base-commit: db7efce4ae23ad5e42f5f55428f529ff62b86fab
change-id: 20260409-topic-usb_mux_nopm-0e52479160c6

Best regards,
-- 
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>