mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 22:14:03 +02:00
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: f82890c98f ("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>
This commit is contained in:
parent
f63edb54d8
commit
29741ca40b
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user