summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXu Rao <raoxu@uniontech.com>2026-06-16 16:54:39 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-10 15:13:50 +0200
commit29741ca40b7b780ba14c4c3ffef190f908864fe9 (patch)
treecd1ab2e340a7b1c1ed03b4bc168c4c3b3f5556ce /include
parentf63edb54d8f738f9c21e2068c777ae1c097df6b7 (diff)
downloadlinux-29741ca40b7b780ba14c4c3ffef190f908864fe9.tar.gz
linux-29741ca40b7b780ba14c4c3ffef190f908864fe9.zip
usb: typec: tcpm: fix EPR AVS APDO maximum voltage decoding
pdo_epr_avs_apdo_max_voltage_mv() extracts the EPR AVS minimum-voltage field instead of the maximum-voltage field. As a result, an EPR AVS APDO with different minimum and maximum voltages is decoded as having identical limits. The currently visible effect is that tcpm_log_source_caps() reports a min-min voltage range. Extract PDO_EPR_AVS_APDO_MAX_VOLT in the maximum-voltage accessor. Fixes: f82890c98f3e ("tcpm: Parse and log AVS APDO") Signed-off-by: Xu Rao <raoxu@uniontech.com> Link: https://patch.msgid.link/48301FCEC9F3CA14+20260616085439.987664-1-raoxu@uniontech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/pd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb/pd.h b/include/linux/usb/pd.h
index 337a5485af7c..ee360dedeaa6 100644
--- a/include/linux/usb/pd.h
+++ b/include/linux/usb/pd.h
@@ -493,7 +493,7 @@ static inline unsigned int pdo_epr_avs_apdo_min_voltage_mv(u32 pdo)
static inline unsigned int pdo_epr_avs_apdo_max_voltage_mv(u32 pdo)
{
- return FIELD_GET(PDO_EPR_AVS_APDO_MIN_VOLT, pdo) * 100;
+ return FIELD_GET(PDO_EPR_AVS_APDO_MAX_VOLT, pdo) * 100;
}
static inline unsigned int pdo_epr_avs_apdo_pdp_w(u32 pdo)