diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-10-25 14:49:29 +0300 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-12-07 07:48:46 -0800 |
commit | 1d103d6af241dbfc7e11eb9a46dff65db257a37f (patch) | |
tree | f0ec3a20f291a20cc3a22602d1fd901ffe36eedd /drivers/usb/typec/ucsi/ucsi.h | |
parent | 6da02af3f910bbcdd2914050cfcab1a9d7980494 (diff) |
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>
Diffstat (limited to 'drivers/usb/typec/ucsi/ucsi.h')
-rw-r--r-- | drivers/usb/typec/ucsi/ucsi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.h b/drivers/usb/typec/ucsi/ucsi.h index 474315a72c77..6478016d5cb8 100644 --- a/drivers/usb/typec/ucsi/ucsi.h +++ b/drivers/usb/typec/ucsi/ucsi.h @@ -317,6 +317,9 @@ struct ucsi { #define EVENT_PENDING 0 #define COMMAND_PENDING 1 #define ACK_PENDING 2 + + unsigned long quirks; +#define UCSI_NO_PARTNER_PDOS BIT(0) /* Don't read partner's PDOs */ }; #define UCSI_MAX_SVID 5 |