usb: typec: ucsi: Fix cable registration
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 3 Sep 2024 13:09:44 +0000 (16:09 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2024 17:26:18 +0000 (19:26 +0200)
commit87eb3cb4ec619299cd5572e1d5eb68aef4074ac2
treee039aae032423dd411156e352ddcb3d2a53d25ed
parentde3d7969f6a80aa5abbbc0f39897495ae35548d0
usb: typec: ucsi: Fix cable registration

The Cable PD Revision field in GET_CABLE_PROPERTY was
introduced in UCSI v2.1, so adding check for that.

The cable properties are also not used anywhere after the
cable is registered, so removing the cable_prop member
from struct ucsi_connector while at it.

Fixes: 38ca416597b0 ("usb: typec: ucsi: Register cables based on GET_CABLE_PROPERTY")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240903130945.3395291-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h