From aae05ba5b59bdcc47e0b38ded97cb7b6d312507a Mon Sep 17 00:00:00 2001 From: The-going <48602507+The-going@users.noreply.github.com> Date: Wed, 8 Oct 2025 22:17:16 +0300 Subject: [PATCH] sunxi-6.12: re-extract megous patches --- ...cpm-unregister-existing-source-caps-before-re.patch | 8 ++++---- ...on-add-reset_resume-callback-for-WWAN-devices.patch | 8 ++++---- ...tcpm-Fix-PD-devices-capabilities-registration.patch | 10 +++++----- .../patches.megous/usb-typec-tcpm-Improve-logs.patch | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch index 383b82300d..0b031d5bf3 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/Revert-usb-typec-tcpm-unregister-existing-source-caps-before-re.patch @@ -1,4 +1,4 @@ -From 1ad5926ae83a3a17ac5dca6fbc9ef0247b97d4ae Mon Sep 17 00:00:00 2001 +From b3ad4255756cc9aa98ce5eb9b90a624cd171118c Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Tue, 7 May 2024 18:39:12 +0200 Subject: Revert "usb: typec: tcpm: unregister existing source caps before @@ -10,10 +10,10 @@ This reverts commit 230ecdf71a644c9c73e0e6735b33173074ae3f94. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index 43e3dac5129f..ad77ad6f4bb0 100644 +index 92ce01b7d049..32d1babf25b4 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c -@@ -3059,7 +3059,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port) +@@ -3063,7 +3063,7 @@ static int tcpm_register_source_caps(struct tcpm_port *port) { struct usb_power_delivery_desc desc = { port->negotiated_rev }; struct usb_power_delivery_capabilities_desc caps = { }; @@ -22,7 +22,7 @@ index 43e3dac5129f..ad77ad6f4bb0 100644 if (!port->partner_pd) port->partner_pd = usb_power_delivery_register(NULL, &desc); -@@ -3069,11 +3069,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port) +@@ -3073,11 +3073,6 @@ static int tcpm_register_source_caps(struct tcpm_port *port) memcpy(caps.pdo, port->source_caps, sizeof(u32) * port->nr_source_caps); caps.role = TYPEC_SOURCE; diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch index 7b4bc245cc..43e8c76845 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-serial-option-add-reset_resume-callback-for-WWAN-devices.patch @@ -1,4 +1,4 @@ -From af05b209dd4df2405466afb21d7de0fe36b96dce Mon Sep 17 00:00:00 2001 +From c66fd52600dca1225d274ecf85520e1ffa2823fb Mon Sep 17 00:00:00 2001 From: Thomas Thorne Date: Tue, 20 Sep 2022 20:34:57 -0400 Subject: usb: serial: option: add 'reset_resume' callback for WWAN devices @@ -17,10 +17,10 @@ However the rest of the patch is not needed/already upstreamed. 1 file changed, 1 insertion(+) diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c -index e5cd33093423..735ff1caea88 100644 +index fc869b7f803f..dc050d59c082 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c -@@ -2481,6 +2481,7 @@ static struct usb_serial_driver option_1port_device = { +@@ -2498,6 +2498,7 @@ static struct usb_serial_driver option_1port_device = { #ifdef CONFIG_PM .suspend = usb_wwan_suspend, .resume = usb_wwan_resume, @@ -29,5 +29,5 @@ index e5cd33093423..735ff1caea88 100644 }; -- -2.43.0 +2.51.0 diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch index c2c3e5c8cc..139c2b4b29 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Fix-PD-devices-capabilities-registration.patch @@ -1,4 +1,4 @@ -From 0bc97969e975df063c38a3cb44c0accb9a7f9ff3 Mon Sep 17 00:00:00 2001 +From 6aeae517a12753cf153da020a5969b76b8376d58 Mon Sep 17 00:00:00 2001 From: Ondrej Jirman Date: Sat, 18 Feb 2023 00:38:44 +0100 Subject: usb: typec: tcpm: Fix PD devices/capabilities registration @@ -15,10 +15,10 @@ Signed-off-by: Ondrej Jirman 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index 5ef123cbfa49..b906fc8ad23c 100644 +index 363acaa35c73..290ef8dad7d1 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c -@@ -3063,15 +3063,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port) +@@ -3067,15 +3067,22 @@ static int tcpm_register_source_caps(struct tcpm_port *port) struct usb_power_delivery_desc desc = { port->negotiated_rev }; struct usb_power_delivery_capabilities_desc caps = { }; struct usb_power_delivery_capabilities *cap; @@ -45,7 +45,7 @@ index 5ef123cbfa49..b906fc8ad23c 100644 cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps); if (IS_ERR(cap)) return PTR_ERR(cap); -@@ -3086,15 +3093,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port) +@@ -3090,15 +3097,22 @@ static int tcpm_register_sink_caps(struct tcpm_port *port) struct usb_power_delivery_desc desc = { port->negotiated_rev }; struct usb_power_delivery_capabilities_desc caps = { }; struct usb_power_delivery_capabilities *cap; @@ -72,7 +72,7 @@ index 5ef123cbfa49..b906fc8ad23c 100644 cap = usb_power_delivery_register_capabilities(port->partner_pd, &caps); if (IS_ERR(cap)) return PTR_ERR(cap); -@@ -7086,10 +7100,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port) +@@ -7090,10 +7104,17 @@ static int tcpm_port_register_pd(struct tcpm_port *port) port->pds[i] = usb_power_delivery_register(port->dev, &desc); if (IS_ERR(port->pds[i])) { ret = PTR_ERR(port->pds[i]); diff --git a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch index e00a6518fd..a958d8d76c 100644 --- a/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch +++ b/patch/kernel/archive/sunxi-6.12/patches.megous/usb-typec-tcpm-Improve-logs.patch @@ -1,4 +1,4 @@ -From a0fdf7e8915d87aea2ee6a1a8fca9deb4fcdca8e Mon Sep 17 00:00:00 2001 +From 7d4ecb6273b04363432e97575da6a89ccf2c49dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= Date: Tue, 23 Nov 2021 17:58:05 +0100 Subject: usb: typec: tcpm: Improve logs @@ -11,7 +11,7 @@ Signed-off-by: Ondrej Jirman 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c -index b906fc8ad23c..b7c83dd73ca3 100644 +index 290ef8dad7d1..8b695ee7513e 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -968,10 +968,13 @@ static int tcpm_pd_transmit(struct tcpm_port *port, @@ -30,7 +30,7 @@ index b906fc8ad23c..b7c83dd73ca3 100644 reinit_completion(&port->tx_complete); ret = port->tcpc->pd_transmit(port->tcpc, tx_sop_type, msg, negotiated_rev); -@@ -3735,6 +3738,10 @@ void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg, +@@ -3739,6 +3742,10 @@ void tcpm_pd_receive(struct tcpm_port *port, const struct pd_message *msg, enum tcpm_transmit_type rx_sop_type) { struct pd_rx_event *event; @@ -41,7 +41,7 @@ index b906fc8ad23c..b7c83dd73ca3 100644 event = kzalloc(sizeof(*event), GFP_ATOMIC); if (!event) -@@ -6033,7 +6040,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1, +@@ -6037,7 +6044,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1, static void _tcpm_pd_vbus_on(struct tcpm_port *port) { @@ -50,7 +50,7 @@ index b906fc8ad23c..b7c83dd73ca3 100644 port->vbus_present = true; /* * When vbus_present is true i.e. Voltage at VBUS is greater than VSAFE5V implicitly -@@ -6123,7 +6130,7 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port) +@@ -6127,7 +6134,7 @@ static void _tcpm_pd_vbus_on(struct tcpm_port *port) static void _tcpm_pd_vbus_off(struct tcpm_port *port) {