usb: typec: Factor out non-PD fwnode properties
authorSamuel Holland <samuel@sholland.org>
Mon, 14 Feb 2022 05:01:16 +0000 (23:01 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Feb 2022 15:21:57 +0000 (16:21 +0100)
commit2e7dfb0e9cacad0f1adbc4b97f0b96ba35027f24
treec1d013edb59863bc5b88661948533bc5caa79979
parent71c16066a53f6ac7e925476070c4dbecfbeceee0
usb: typec: Factor out non-PD fwnode properties

Basic programmable non-PD Type-C port controllers do not need the full
TCPM library, but they share the same devicetree binding and the same
typec_capability structure. Factor out a helper for parsing those
properties which map to fields in struct typec_capability, so the code
can be shared between TCPM and basic non-TCPM drivers.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20220214050118.61015-4-samuel@sholland.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/class.c
drivers/usb/typec/tcpm/tcpm.c
include/linux/usb/typec.h