]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: typec: ps883x: Cache register settings, not Type-C mode
authorKonrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tue, 14 Oct 2025 16:06:45 +0000 (18:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Oct 2025 08:58:31 +0000 (10:58 +0200)
commitf83cb615cb7a615f9c15787f914a8eee1c6e93d4
treeaa6e85332de9c847bf1eadf01e2b97ca1993a2cd
parent26c3af0cd8b44c591f27be373266765a8606ad69
usb: typec: ps883x: Cache register settings, not Type-C mode

Certain Type-C mode configurations may result in identical settings of
the PS8830. Check if the latter have changed instead of assuming
there's always a difference.

ps883x_set() is changed to accept a typec_retimer_state in preparation
for more work and the ps883x_sw_set() (which only handles orientation
switching) is changed to use regmap_assign_bits(), which itself does
not perform any writes if the desired value is already set.

Reviewed-by: Jack Pham <jack.pham@oss.qualcomm.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20251014-topic-ps883x_usb4-v1-1-e6adb1a4296e@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/mux/ps883x.c