drivers/usb/typec/ucsi/psy.c | 41 ++++++++++++++++++++++++++++++++++- drivers/usb/typec/ucsi/ucsi.c | 35 +++++++++++++++++++++++++----- drivers/usb/typec/ucsi/ucsi.h | 4 ++++ 3 files changed, 73 insertions(+), 7 deletions(-)
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) Reports power supply USB type as "DRP" when the port partner is a DRP. 3) Updates ucsi.c to report a power supply change all power opmode changes. Currently this only gets reported when opmode is PD. 4) Updates ucsi.c to report a power supply change when the PPM signals a sink path change. 5) Set max current to 0 when no device is connected. Currently this defaults to 0.1A. 6) Updates connector status after initiating a PR swap. Following the UCSI spec, there is no reported change following a successful SET_PDR command. This results in the stored connector status being outdated. Abhishek Pandit-Subedi (1): usb: typec: ucsi: pr_swap should check connector_status Jameson Thies (5): usb: typec: ucsi: psy: Add power supply status usb: typec: ucsi: psy: Add support for DRP USB type usb: typec: ucsi: Report power supply changes on power opmode changes usb: typec: ucsi: Report power supply change on sink path change usb: typec: ucsi: psy: Set max current to zero when disconnected drivers/usb/typec/ucsi/psy.c | 41 ++++++++++++++++++++++++++++++++++- drivers/usb/typec/ucsi/ucsi.c | 35 +++++++++++++++++++++++++----- drivers/usb/typec/ucsi/ucsi.h | 4 ++++ 3 files changed, 73 insertions(+), 7 deletions(-) base-commit: e40b984b6c4ce3f80814f39f86f87b2a48f2e662 -- 2.51.0.618.g983fd99d29-goog
On Tue, Oct 07, 2025 at 12:00:01AM +0000, 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) Reports power supply USB type as "DRP" when the port partner is a > DRP. > 3) Updates ucsi.c to report a power supply change all power opmode > changes. Currently this only gets reported when opmode is PD. > 4) Updates ucsi.c to report a power supply change when the PPM signals > a sink path change. > 5) Set max current to 0 when no device is connected. Currently this > defaults to 0.1A. > 6) Updates connector status after initiating a PR swap. Following the > UCSI spec, there is no reported change following a successful SET_PDR > command. This results in the stored connector status being outdated. > > Abhishek Pandit-Subedi (1): > usb: typec: ucsi: pr_swap should check connector_status > > Jameson Thies (5): > usb: typec: ucsi: psy: Add power supply status > usb: typec: ucsi: psy: Add support for DRP USB type > usb: typec: ucsi: Report power supply changes on power opmode changes > usb: typec: ucsi: Report power supply change on sink path change > usb: typec: ucsi: psy: Set max current to zero when disconnected Please do not mix bug fixes and updates to the driver in the same patch series, as that means the bug fixes will be delayed until the next release, not the current one, as I can't take them all at once. thanks, greg k-h
Thank you for this feedback. The only patch here which is a clear bug fix is 5/6. Currently the driver reports 0.1A max current when nothing is connected on the port. I'll send that patch separately.
On Mon, Oct 13, 2025 at 01:59:23PM -0700, Jameson Thies wrote: > Thank you for this feedback. The only patch here which is a clear bug > fix is 5/6. Currently the driver reports 0.1A max current when nothing > is connected on the port. I'll send that patch separately. meta-comment, you lost all context here and I have no idea what you are responding to, or what this is about :( Remember, some of us get 1000+ emails a day to handle, context matters. thanks, greg k-h
On 10/6/25 17:00, Jameson Thies wrote: > This series includes the following minor changes to power supply > handling by the UCSI driver. ... > base-commit: e40b984b6c4ce3f80814f39f86f87b2a48f2e662 I wanted to let you know that on my Dell XPS-9320, this patchset ended up spamming (i.e., hundreds) my dmesg with the following: power_supply ucsi-source-psy-USBC000:002: driver reporting unavailable enum value 7 ... which I believe to be POWER_SUPPLY_USB_TYPE_PD_DRP . In my case it was coming from the call to power_supply_show_enum_with_available() on/around line 380 in .../drivers/power/supply/power_supply_sysfs.c ; I'd tried adding POWER_SUPPLY_USB_TYPE_PD_DRP to con->psy_desc.usb_types in ucsi_register_port_psy() in .../drivers/usb/typec/ucsi/psy.c thinking that may fix it with no success. LMK if you need any further info, -Kenny -- Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA
Hi Kenneth, You are correct that adding POWER_SUPPLY_USB_TYPE_PD_DRP in ucsi_register_port_psy() is missing here. I would have expected that adding it resolves the issue. I'll take a closer look, thanks for raising this.
On 10/13/25 15:53, Jameson Thies wrote: > You are correct that adding POWER_SUPPLY_USB_TYPE_PD_DRP in > ucsi_register_port_psy() is missing here. I would have expected that > adding it resolves the issue. The issue must be deeper than that, as I even went as far as making the check for "allowed types" pass all the time (as the dmesg was swamped making booting difficult so debugging was somewhat painful) and was still getting "enum" errors. ... that being said, I had a flight to catch on Friday so didn't keep working on a fix. -Kenny -- Kenneth R. Crudup / Sr. SW Engineer, Scott County Consulting, Orange County CA
© 2016 - 2025 Red Hat, Inc.