usb: typec: ucsi: fix UCSI on buggy Qualcomm devices
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Wed, 25 Oct 2023 11:49:29 +0000 (14:49 +0300)
committerBjorn Andersson <andersson@kernel.org>
Thu, 7 Dec 2023 15:48:46 +0000 (07:48 -0800)
commit1d103d6af241dbfc7e11eb9a46dff65db257a37f
treef0ec3a20f291a20cc3a22602d1fd901ffe36eedd
parent6da02af3f910bbcdd2914050cfcab1a9d7980494
usb: typec: ucsi: fix UCSI on buggy Qualcomm devices

On sevral Qualcomm platforms (SC8180X, SM8350, SC8280XP) a call to
UCSI_GET_PDOS for non-PD partners will cause a firmware crash with no
easy way to recover from it. Since we have no easy way to determine
whether the partner really has PD support, shortcut UCSI_GET_PDOS on
such platforms. This allows us to enable UCSI support on such devices.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20231025115620.905538-2-dmitry.baryshkov@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h
drivers/usb/typec/ucsi/ucsi_glink.c