Re: [PATCH v5 2/3] usb: typec: tipd: Factor out i2c specifics

Janne Grunau <[email protected]>
Newsgroups org.infradead.lists.linux-arm-kernel,dev.linux.lists.asahi,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-usb
Message-ID <[email protected]>
On Fri, Aug 21, 2026 at 10:26:20AM +0200, Sasha Finkelstein wrote:
> From: Alyssa Milburn <[email protected]>
> 
> Make the core driver more bus-agnostic to prepare for SPMI variants of
> the tipd chip
> 
> Signed-off-by: Alyssa Milburn <[email protected]>
> Reviewed-by: Heikki Krogerus <[email protected]>
> Signed-off-by: Sasha Finkelstein <[email protected]>
> ---
>  drivers/usb/typec/tipd/Kconfig    |   8 +++--
>  drivers/usb/typec/tipd/Makefile   |  11 ++++---
>  drivers/usb/typec/tipd/core.c     | 230 ++++++++++++++++++++++++-----------------------------------------------------------------------------------------------------------------------
>  drivers/usb/typec/tipd/i2c.c      | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/usb/typec/tipd/tps6598x.h | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  5 files changed, 280 insertions(+), 198 deletions(-)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 522f56742aa9..36fccd45858b 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -2085,33 +1950,14 @@ static const struct tipd_data tps25750_data = {
>  	.connect = tps6598x_connect,
>  };
>  
> -static const struct of_device_id tps6598x_of_match[] = {
> -	{ .compatible = "ti,tps6598x", &tps6598x_data},
> -	{ .compatible = "ti,tps66993", &tps66993_data},
> -	{ .compatible = "apple,cd321x", &cd321x_data},
> -	{ .compatible = "ti,tps25750", &tps25750_data},
> -	{}
> -};
> -MODULE_DEVICE_TABLE(of, tps6598x_of_match);
> -
> -static const struct i2c_device_id tps6598x_id[] = {
> -	{ .name = "tps6598x", .driver_data = (kernel_ulong_t)&tps6598x_data },
> -	{ }
> -};
> -MODULE_DEVICE_TABLE(i2c, tps6598x_id);
> -
> -static struct i2c_driver tps6598x_i2c_driver = {
> -	.driver = {
> -		.name = "tps6598x",
> -		.pm = &tps6598x_pm_ops,
> -		.of_match_table = tps6598x_of_match,
> -	},
> -	.probe = tps6598x_probe,
> -	.remove = tps6598x_remove,
> -	.id_table = tps6598x_id,
> +const struct tipd_data *tipd_hw_variants[] = {
> +	[TIPD_VARIANT_CD321X] = &tipd_cd321x_data,
> +	[TIPD_VARIANT_TPS6598X] = &tipd_tps6598x_data,
> +	[TIPD_VARIANT_TPS66993] = &tipd_tps6598x_data,

this should be &tipd_tps66993_data

Janne
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.