mbox series

[0/2] usb: typec: tcpm: Fix logic and documentation of tcpc_dev->init

Message ID 20210511022224.1309077-1-bryan.odonoghue@linaro.org
Headers show
Series usb: typec: tcpm: Fix logic and documentation of tcpc_dev->init | expand

Message

Bryan O'Donoghue May 11, 2021, 2:22 a.m. UTC
The tcpm code treats the init callback as optional when registering a port
but as required when doing a tcpm_init(). In addition we uniquely don't
document init in struct tcpc_dev {}.

This series fixes both situations calling tcpc_dev->init() only if the
implementing driver provides an init and documenting init in the tcpc_dev
data-structure for consistency.

Bryan O'Donoghue (2):
  usb: typec: tcpm: Call init callback only when provided
  usb: typec: tcpm: Add a description for the init callback

 drivers/usb/typec/tcpm/tcpm.c | 3 ++-
 include/linux/usb/tcpm.h      | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.30.1