linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] UCSI Power Supply Updates
@ 2025-10-16 23:59 Jameson Thies
  2025-10-16 23:59 ` [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status Jameson Thies
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Jameson Thies @ 2025-10-16 23:59 UTC (permalink / raw)
  To: heikki.krogerus, linux-usb, linux-kernel
  Cc: dmitry.baryshkov, bleung, gregkh, akuchynski, abhishekpandit,
	sebastian.reichel, kenny, linux-pm, Jameson Thies

This series includes the following minor changes to power supply
handling by the UCSI driver.

1) Adds the "Status" property to power supplies registered by the UCSI
driver.
2) Updates ucsi.c to report a power supply change all power opmode
changes. Currently this only gets reported when opmode is PD.
3) Updates ucsi.c to report a power supply change when the PPM signals
a sink path change.

v2 changes
- Removed patch adding support for reporting DRP power supply types.
  It led to spam in dmesg and needs further debug.
- Removed patch to report 0 max current when a port is not connected.
  This is a bug fix and should be reviewed separately.
- Removed patch to refresh connector status after PR swaps. This is
  not directly related to the power supply and should be sent up
  separately.
- Updated patch notify the power supply class of sink path status
  changes. It now uses a single bit mask for checking both sink path
  status changes and battery charging status changes.

Jameson Thies (3):
  usb: typec: ucsi: psy: Add power supply status
  usb: typec: ucsi: Report power supply changes on power opmode changes
  usb: typec: ucsi: Report power supply change on sink path change

 drivers/usb/typec/ucsi/psy.c  | 26 ++++++++++++++++++++++++++
 drivers/usb/typec/ucsi/ucsi.c |  5 ++++-
 drivers/usb/typec/ucsi/ucsi.h |  4 ++++
 3 files changed, 34 insertions(+), 1 deletion(-)


base-commit: e40b984b6c4ce3f80814f39f86f87b2a48f2e662
-- 
2.51.0.858.gf9c4a03a3a-goog


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

* [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status
  2025-10-16 23:59 [PATCH v2 0/3] UCSI Power Supply Updates Jameson Thies
@ 2025-10-16 23:59 ` Jameson Thies
  2025-10-17  0:09   ` Benson Leung
  2025-10-16 23:59 ` [PATCH v2 2/3] usb: typec: ucsi: Report power supply changes on power opmode changes Jameson Thies
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 8+ messages in thread
From: Jameson Thies @ 2025-10-16 23:59 UTC (permalink / raw)
  To: heikki.krogerus, linux-usb, linux-kernel
  Cc: dmitry.baryshkov, bleung, gregkh, akuchynski, abhishekpandit,
	sebastian.reichel, kenny, linux-pm, Jameson Thies

Add support for power supply status. If a port is acting as a sink
with the sink path enabled, report it is charging. If a port is
source, report it is discharging. If there is no connection or the
port hasn't enabled the sink path, report not charging.

Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/usb/typec/ucsi/psy.c  | 26 ++++++++++++++++++++++++++
 drivers/usb/typec/ucsi/ucsi.h |  3 +++
 2 files changed, 29 insertions(+)

diff --git a/drivers/usb/typec/ucsi/psy.c b/drivers/usb/typec/ucsi/psy.c
index 62a9d68bb66d..2b0225821502 100644
--- a/drivers/usb/typec/ucsi/psy.c
+++ b/drivers/usb/typec/ucsi/psy.c
@@ -29,6 +29,7 @@ static enum power_supply_property ucsi_psy_props[] = {
 	POWER_SUPPLY_PROP_CURRENT_MAX,
 	POWER_SUPPLY_PROP_CURRENT_NOW,
 	POWER_SUPPLY_PROP_SCOPE,
+	POWER_SUPPLY_PROP_STATUS,
 };
 
 static int ucsi_psy_get_scope(struct ucsi_connector *con,
@@ -51,6 +52,29 @@ static int ucsi_psy_get_scope(struct ucsi_connector *con,
 	return 0;
 }
 
+static int ucsi_psy_get_status(struct ucsi_connector *con,
+			       union power_supply_propval *val)
+{
+	bool is_sink = UCSI_CONSTAT(con, PWR_DIR) == TYPEC_SINK;
+	bool sink_path_enabled = true;
+
+	val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
+
+	if (con->ucsi->version >= UCSI_VERSION_2_0)
+		sink_path_enabled =
+			UCSI_CONSTAT(con, SINK_PATH_STATUS_V2_0) ==
+			UCSI_CONSTAT_SINK_PATH_ENABLED;
+
+	if (UCSI_CONSTAT(con, CONNECTED)) {
+		if (is_sink && sink_path_enabled)
+			val->intval = POWER_SUPPLY_STATUS_CHARGING;
+		else if (!is_sink)
+			val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
+	}
+
+	return 0;
+}
+
 static int ucsi_psy_get_online(struct ucsi_connector *con,
 			       union power_supply_propval *val)
 {
@@ -245,6 +269,8 @@ static int ucsi_psy_get_prop(struct power_supply *psy,
 		return ucsi_psy_get_current_now(con, val);
 	case POWER_SUPPLY_PROP_SCOPE:
 		return ucsi_psy_get_scope(con, val);
+	case POWER_SUPPLY_PROP_STATUS:
+		return ucsi_psy_get_status(con, val);
 	default:
 		return -EINVAL;
 	}
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
index e301d9012936..cce93af7461b 100644
--- a/drivers/usb/typec/ucsi/ucsi.h
+++ b/drivers/usb/typec/ucsi/ucsi.h
@@ -360,6 +360,9 @@ struct ucsi_cable_property {
 #define   UCSI_CONSTAT_BC_SLOW_CHARGING		2
 #define   UCSI_CONSTAT_BC_TRICKLE_CHARGING	3
 #define UCSI_CONSTAT_PD_VERSION_V1_2		UCSI_DECLARE_BITFIELD_V1_2(70, 16)
+#define UCSI_CONSTAT_SINK_PATH_STATUS_V2_0	UCSI_DECLARE_BITFIELD_V2_0(87, 1)
+#define   UCSI_CONSTAT_SINK_PATH_DISABLED   0
+#define   UCSI_CONSTAT_SINK_PATH_ENABLED    1
 #define UCSI_CONSTAT_PWR_READING_READY_V2_1	UCSI_DECLARE_BITFIELD_V2_1(89, 1)
 #define UCSI_CONSTAT_CURRENT_SCALE_V2_1		UCSI_DECLARE_BITFIELD_V2_1(90, 3)
 #define UCSI_CONSTAT_PEAK_CURRENT_V2_1		UCSI_DECLARE_BITFIELD_V2_1(93, 16)
-- 
2.51.0.858.gf9c4a03a3a-goog


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

* [PATCH v2 2/3] usb: typec: ucsi: Report power supply changes on power opmode changes
  2025-10-16 23:59 [PATCH v2 0/3] UCSI Power Supply Updates Jameson Thies
  2025-10-16 23:59 ` [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status Jameson Thies
@ 2025-10-16 23:59 ` Jameson Thies
  2025-10-16 23:59 ` [PATCH v2 3/3] usb: typec: ucsi: Report power supply change on sink path change Jameson Thies
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Jameson Thies @ 2025-10-16 23:59 UTC (permalink / raw)
  To: heikki.krogerus, linux-usb, linux-kernel
  Cc: dmitry.baryshkov, bleung, gregkh, akuchynski, abhishekpandit,
	sebastian.reichel, kenny, linux-pm, Jameson Thies

Report opmode changes from the PPM to the power supply class by calling
ucsi_port_psy_changed(). If the current opmode is USB PD, do not call
ucsi_port_psy_changed(). The power supply class will be updated after
requesting partner source PDOs.

Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
---
 drivers/usb/typec/ucsi/ucsi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 3f568f790f39..7b718049d0d1 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1022,14 +1022,17 @@ static void ucsi_pwr_opmode_change(struct ucsi_connector *con)
 	case UCSI_CONSTAT_PWR_OPMODE_TYPEC1_5:
 		con->rdo = 0;
 		typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_1_5A);
+		ucsi_port_psy_changed(con);
 		break;
 	case UCSI_CONSTAT_PWR_OPMODE_TYPEC3_0:
 		con->rdo = 0;
 		typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_3_0A);
+		ucsi_port_psy_changed(con);
 		break;
 	default:
 		con->rdo = 0;
 		typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_USB);
+		ucsi_port_psy_changed(con);
 		break;
 	}
 }
-- 
2.51.0.858.gf9c4a03a3a-goog


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

* [PATCH v2 3/3] usb: typec: ucsi: Report power supply change on sink path change
  2025-10-16 23:59 [PATCH v2 0/3] UCSI Power Supply Updates Jameson Thies
  2025-10-16 23:59 ` [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status Jameson Thies
  2025-10-16 23:59 ` [PATCH v2 2/3] usb: typec: ucsi: Report power supply changes on power opmode changes Jameson Thies
@ 2025-10-16 23:59 ` Jameson Thies
  2025-10-17  0:11   ` Benson Leung
  2025-10-17  0:16 ` [PATCH v2 0/3] UCSI Power Supply Updates Kenneth Crudup
  2025-10-17  0:25 ` Kenneth Crudup
  4 siblings, 1 reply; 8+ messages in thread
From: Jameson Thies @ 2025-10-16 23:59 UTC (permalink / raw)
  To: heikki.krogerus, linux-usb, linux-kernel
  Cc: dmitry.baryshkov, bleung, gregkh, akuchynski, abhishekpandit,
	sebastian.reichel, kenny, linux-pm, Jameson Thies

Update the UCSI interface driver to report a power supply change when
the PPM sets the Sink Path Change bit.

Signed-off-by: Jameson Thies <jthies@google.com>
---
 drivers/usb/typec/ucsi/ucsi.c | 2 +-
 drivers/usb/typec/ucsi/ucsi.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 7b718049d0d1..cad3913bd7f9 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1293,7 +1293,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
 	if (change & UCSI_CONSTAT_CAM_CHANGE)
 		ucsi_partner_task(con, ucsi_check_altmodes, 1, HZ);
 
-	if (change & UCSI_CONSTAT_BC_CHANGE)
+	if (change & (UCSI_CONSTAT_BC_CHANGE | UCSI_CONSTAT_SINK_PATH_CHANGE))
 		ucsi_port_psy_changed(con);
 
 	if (con->ucsi->version >= UCSI_VERSION_2_1 &&
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
index cce93af7461b..35993bc34d4d 100644
--- a/drivers/usb/typec/ucsi/ucsi.h
+++ b/drivers/usb/typec/ucsi/ucsi.h
@@ -382,6 +382,7 @@ struct ucsi_cable_property {
 #define UCSI_CONSTAT_BC_CHANGE			BIT(9)
 #define UCSI_CONSTAT_PARTNER_CHANGE		BIT(11)
 #define UCSI_CONSTAT_POWER_DIR_CHANGE		BIT(12)
+#define UCSI_CONSTAT_SINK_PATH_CHANGE		BIT(13)
 #define UCSI_CONSTAT_CONNECT_CHANGE		BIT(14)
 #define UCSI_CONSTAT_ERROR			BIT(15)
 
-- 
2.51.0.858.gf9c4a03a3a-goog


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

* Re: [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status
  2025-10-16 23:59 ` [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status Jameson Thies
@ 2025-10-17  0:09   ` Benson Leung
  0 siblings, 0 replies; 8+ messages in thread
From: Benson Leung @ 2025-10-17  0:09 UTC (permalink / raw)
  To: Jameson Thies
  Cc: heikki.krogerus, linux-usb, linux-kernel, dmitry.baryshkov,
	bleung, gregkh, akuchynski, abhishekpandit, sebastian.reichel,
	kenny, linux-pm

[-- Attachment #1: Type: text/plain, Size: 3276 bytes --]

On Thu, Oct 16, 2025 at 11:59:07PM +0000, Jameson Thies wrote:
> Add support for power supply status. If a port is acting as a sink
> with the sink path enabled, report it is charging. If a port is
> source, report it is discharging. If there is no connection or the
> port hasn't enabled the sink path, report not charging.
> 
> Signed-off-by: Jameson Thies <jthies@google.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

Reviewed-by: Benson Leung <bleung@chromium.org>


> ---
>  drivers/usb/typec/ucsi/psy.c  | 26 ++++++++++++++++++++++++++
>  drivers/usb/typec/ucsi/ucsi.h |  3 +++
>  2 files changed, 29 insertions(+)
> 
> diff --git a/drivers/usb/typec/ucsi/psy.c b/drivers/usb/typec/ucsi/psy.c
> index 62a9d68bb66d..2b0225821502 100644
> --- a/drivers/usb/typec/ucsi/psy.c
> +++ b/drivers/usb/typec/ucsi/psy.c
> @@ -29,6 +29,7 @@ static enum power_supply_property ucsi_psy_props[] = {
>  	POWER_SUPPLY_PROP_CURRENT_MAX,
>  	POWER_SUPPLY_PROP_CURRENT_NOW,
>  	POWER_SUPPLY_PROP_SCOPE,
> +	POWER_SUPPLY_PROP_STATUS,
>  };
>  
>  static int ucsi_psy_get_scope(struct ucsi_connector *con,
> @@ -51,6 +52,29 @@ static int ucsi_psy_get_scope(struct ucsi_connector *con,
>  	return 0;
>  }
>  
> +static int ucsi_psy_get_status(struct ucsi_connector *con,
> +			       union power_supply_propval *val)
> +{
> +	bool is_sink = UCSI_CONSTAT(con, PWR_DIR) == TYPEC_SINK;
> +	bool sink_path_enabled = true;
> +
> +	val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
> +
> +	if (con->ucsi->version >= UCSI_VERSION_2_0)
> +		sink_path_enabled =
> +			UCSI_CONSTAT(con, SINK_PATH_STATUS_V2_0) ==
> +			UCSI_CONSTAT_SINK_PATH_ENABLED;
> +
> +	if (UCSI_CONSTAT(con, CONNECTED)) {
> +		if (is_sink && sink_path_enabled)
> +			val->intval = POWER_SUPPLY_STATUS_CHARGING;
> +		else if (!is_sink)
> +			val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
> +	}
> +
> +	return 0;
> +}
> +
>  static int ucsi_psy_get_online(struct ucsi_connector *con,
>  			       union power_supply_propval *val)
>  {
> @@ -245,6 +269,8 @@ static int ucsi_psy_get_prop(struct power_supply *psy,
>  		return ucsi_psy_get_current_now(con, val);
>  	case POWER_SUPPLY_PROP_SCOPE:
>  		return ucsi_psy_get_scope(con, val);
> +	case POWER_SUPPLY_PROP_STATUS:
> +		return ucsi_psy_get_status(con, val);
>  	default:
>  		return -EINVAL;
>  	}
> diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
> index e301d9012936..cce93af7461b 100644
> --- a/drivers/usb/typec/ucsi/ucsi.h
> +++ b/drivers/usb/typec/ucsi/ucsi.h
> @@ -360,6 +360,9 @@ struct ucsi_cable_property {
>  #define   UCSI_CONSTAT_BC_SLOW_CHARGING		2
>  #define   UCSI_CONSTAT_BC_TRICKLE_CHARGING	3
>  #define UCSI_CONSTAT_PD_VERSION_V1_2		UCSI_DECLARE_BITFIELD_V1_2(70, 16)
> +#define UCSI_CONSTAT_SINK_PATH_STATUS_V2_0	UCSI_DECLARE_BITFIELD_V2_0(87, 1)
> +#define   UCSI_CONSTAT_SINK_PATH_DISABLED   0
> +#define   UCSI_CONSTAT_SINK_PATH_ENABLED    1
>  #define UCSI_CONSTAT_PWR_READING_READY_V2_1	UCSI_DECLARE_BITFIELD_V2_1(89, 1)
>  #define UCSI_CONSTAT_CURRENT_SCALE_V2_1		UCSI_DECLARE_BITFIELD_V2_1(90, 3)
>  #define UCSI_CONSTAT_PEAK_CURRENT_V2_1		UCSI_DECLARE_BITFIELD_V2_1(93, 16)
> -- 
> 2.51.0.858.gf9c4a03a3a-goog
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 3/3] usb: typec: ucsi: Report power supply change on sink path change
  2025-10-16 23:59 ` [PATCH v2 3/3] usb: typec: ucsi: Report power supply change on sink path change Jameson Thies
@ 2025-10-17  0:11   ` Benson Leung
  0 siblings, 0 replies; 8+ messages in thread
From: Benson Leung @ 2025-10-17  0:11 UTC (permalink / raw)
  To: Jameson Thies
  Cc: heikki.krogerus, linux-usb, linux-kernel, dmitry.baryshkov,
	bleung, gregkh, akuchynski, abhishekpandit, sebastian.reichel,
	kenny, linux-pm

[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]

On Thu, Oct 16, 2025 at 11:59:09PM +0000, Jameson Thies wrote:
> Update the UCSI interface driver to report a power supply change when
> the PPM sets the Sink Path Change bit.
> 
> Signed-off-by: Jameson Thies <jthies@google.com>

Reviewed-by: Benson Leung <bleung@chromium.org>


> ---
>  drivers/usb/typec/ucsi/ucsi.c | 2 +-
>  drivers/usb/typec/ucsi/ucsi.h | 1 +
>  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 7b718049d0d1..cad3913bd7f9 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1293,7 +1293,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
>  	if (change & UCSI_CONSTAT_CAM_CHANGE)
>  		ucsi_partner_task(con, ucsi_check_altmodes, 1, HZ);
>  
> -	if (change & UCSI_CONSTAT_BC_CHANGE)
> +	if (change & (UCSI_CONSTAT_BC_CHANGE | UCSI_CONSTAT_SINK_PATH_CHANGE))
>  		ucsi_port_psy_changed(con);
>  
>  	if (con->ucsi->version >= UCSI_VERSION_2_1 &&
> diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h
> index cce93af7461b..35993bc34d4d 100644
> --- a/drivers/usb/typec/ucsi/ucsi.h
> +++ b/drivers/usb/typec/ucsi/ucsi.h
> @@ -382,6 +382,7 @@ struct ucsi_cable_property {
>  #define UCSI_CONSTAT_BC_CHANGE			BIT(9)
>  #define UCSI_CONSTAT_PARTNER_CHANGE		BIT(11)
>  #define UCSI_CONSTAT_POWER_DIR_CHANGE		BIT(12)
> +#define UCSI_CONSTAT_SINK_PATH_CHANGE		BIT(13)
>  #define UCSI_CONSTAT_CONNECT_CHANGE		BIT(14)
>  #define UCSI_CONSTAT_ERROR			BIT(15)
>  
> -- 
> 2.51.0.858.gf9c4a03a3a-goog
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 0/3] UCSI Power Supply Updates
  2025-10-16 23:59 [PATCH v2 0/3] UCSI Power Supply Updates Jameson Thies
                   ` (2 preceding siblings ...)
  2025-10-16 23:59 ` [PATCH v2 3/3] usb: typec: ucsi: Report power supply change on sink path change Jameson Thies
@ 2025-10-17  0:16 ` Kenneth Crudup
  2025-10-17  0:25 ` Kenneth Crudup
  4 siblings, 0 replies; 8+ messages in thread
From: Kenneth Crudup @ 2025-10-17  0:16 UTC (permalink / raw)
  To: Jameson Thies, heikki.krogerus, linux-usb, linux-kernel,
	Kenneth C
  Cc: dmitry.baryshkov, bleung, gregkh, akuchynski, abhishekpandit,
	sebastian.reichel, linux-pm


On 10/16/25 16:59, Jameson Thies wrote:

> v2 changes
> - Removed patch adding support for reporting DRP power supply types.
>    It led to spam in dmesg and needs further debug.

So far, so good! I'm currently booted (along with the "Add power supply 
status" patch) and no issues so far.

I'll look for the sysfs entries and report back with a Tested-By: if all 
is well.

-Kenny--
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange 
County CA


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

* Re: [PATCH v2 0/3] UCSI Power Supply Updates
  2025-10-16 23:59 [PATCH v2 0/3] UCSI Power Supply Updates Jameson Thies
                   ` (3 preceding siblings ...)
  2025-10-17  0:16 ` [PATCH v2 0/3] UCSI Power Supply Updates Kenneth Crudup
@ 2025-10-17  0:25 ` Kenneth Crudup
  4 siblings, 0 replies; 8+ messages in thread
From: Kenneth Crudup @ 2025-10-17  0:25 UTC (permalink / raw)
  To: Jameson Thies, heikki.krogerus, linux-usb, linux-kernel,
	Kenneth C
  Cc: dmitry.baryshkov, bleung, gregkh, akuchynski, abhishekpandit,
	sebastian.reichel, linux-pm


Tested-By: Kenneth R. Crudup <kenny@panix.com>

On 10/16/25 16:59, Jameson Thies wrote:
> This series includes the following minor changes to power supply
> handling by the UCSI driver.
> 
> 1) Adds the "Status" property to power supplies registered by the UCSI
> driver.
> 2) Updates ucsi.c to report a power supply change all power opmode
> changes. Currently this only gets reported when opmode is PD.
> 3) Updates ucsi.c to report a power supply change when the PPM signals
> a sink path change.
> 
> v2 changes
> - Removed patch adding support for reporting DRP power supply types.
>    It led to spam in dmesg and needs further debug.
> - Removed patch to report 0 max current when a port is not connected.
>    This is a bug fix and should be reviewed separately.
> - Removed patch to refresh connector status after PR swaps. This is
>    not directly related to the power supply and should be sent up
>    separately.
> - Updated patch notify the power supply class of sink path status
>    changes. It now uses a single bit mask for checking both sink path
>    status changes and battery charging status changes.
> 
> Jameson Thies (3):
>    usb: typec: ucsi: psy: Add power supply status
>    usb: typec: ucsi: Report power supply changes on power opmode changes
>    usb: typec: ucsi: Report power supply change on sink path change
> 
>   drivers/usb/typec/ucsi/psy.c  | 26 ++++++++++++++++++++++++++
>   drivers/usb/typec/ucsi/ucsi.c |  5 ++++-
>   drivers/usb/typec/ucsi/ucsi.h |  4 ++++
>   3 files changed, 34 insertions(+), 1 deletion(-)
> 
> 
> base-commit: e40b984b6c4ce3f80814f39f86f87b2a48f2e662

-- 
Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange 
County CA


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

end of thread, other threads:[~2025-10-17  0:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-16 23:59 [PATCH v2 0/3] UCSI Power Supply Updates Jameson Thies
2025-10-16 23:59 ` [PATCH v2 1/3] usb: typec: ucsi: psy: Add power supply status Jameson Thies
2025-10-17  0:09   ` Benson Leung
2025-10-16 23:59 ` [PATCH v2 2/3] usb: typec: ucsi: Report power supply changes on power opmode changes Jameson Thies
2025-10-16 23:59 ` [PATCH v2 3/3] usb: typec: ucsi: Report power supply change on sink path change Jameson Thies
2025-10-17  0:11   ` Benson Leung
2025-10-17  0:16 ` [PATCH v2 0/3] UCSI Power Supply Updates Kenneth Crudup
2025-10-17  0:25 ` Kenneth Crudup

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).