usb: typec: tipd: add init and reset functions to tipd_data
authorJavier Carrasco <javier.carrasco@wolfvision.net>
Thu, 14 Dec 2023 16:29:09 +0000 (17:29 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Jan 2024 13:41:29 +0000 (14:41 +0100)
commitd49f90822015ad9c8837717e6b5967c8748626df
tree30c164eb9c1224a402d9f21d76649d547ee6e716
parent961410c9e8534d3c6f347c04cacf50bc5c002a3f
usb: typec: tipd: add init and reset functions to tipd_data

The current implementation includes a number of special cases for the
tps25750. Nevertheless, init and reset functions can be generalized by
adding function pointers to the tipd_data structure in order to offer
that functionality to other parts without additional conditional
clauses.

Some functionality like the cold reset request (GAID) is shared by the
tps25750 and the tps6598x, so they can use the same reset function.

Signed-off-by: Javier Carrasco <javier.carrasco@wolfvision.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20231207-tps6598x_update-v2-1-f3cfcde6d890@wolfvision.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tipd/core.c