Hi, On Thu, Jun 25, 2026 at 07:05:55PM +0300, Boris Shtrasman wrote: > modify kselftest to check for usb_types values from > Documentation/ABI/testing/sysfs-class-power instead of only checking for > property. > > Added the > "Unknown", "SDP", "DCP", "CDP", "ACA", "C", "PD", > "PD_DRP", "PD_PPS", "BrickID", "PD_SPR_AVS", > "PD_PPS_SPR_AVS" values from the > /sys/class/power_supply/<supply_name>/usb_type section. > > Signed-off-by: Boris Shtrasman <[email protected]> > --- > .../selftests/power_supply/test_power_supply_properties.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git > a/tools/testing/selftests/power_supply/test_power_supply_properties.sh > b/tools/testing/selftests/power_supply/test_power_supply_properties.sh > index a66b1313ed88..7bf76af4cfd5 100755 > --- a/tools/testing/selftests/power_supply/test_power_supply_properties.sh > +++ b/tools/testing/selftests/power_supply/test_power_supply_properties.sh > @@ -58,7 +58,10 @@ for DEVNAME in $supplies; do > # This fails on kernels < 5.8 (needs 2ad3d74e3c69f) > test_uevent_prop TYPE "$SUPPLY_TYPE" > > - test_sysfs_prop_optional usb_type > + test_sysfs_prop_optional_list \ > + usb_type "Unknown","SDP","DCP","CDP","ACA","C","PD"\ > + ,"PD_DRP","PD_PPS","BrickID", "PD_SPR_AVS" \ > + ,"PD_PPS_SPR_AVS"
I've picked up the other patch, but skipped this one, because it does not work. The usb_type property reports back differently from what the test_sysfs_prop_optional_list function expects: sre@venus ~ % cat /sys/class/power_supply/ucsi-source-psy-pmic_glink.ucsi.01/usb_type [C] PD PD_PPS Greetings, -- Sebastian
signature.asc
Description: PGP signature

