Re: [PATCH v2 1/4] tpm: Add tpm_tis_i2c backend for tpm_tis_core

From: Krzysztof Kozlowski
Date: Sat May 07 2022 - 12:01:18 EST


On 06/05/2022 19:00, Johannes Holland wrote:
> Implement the TCG I2C Interface driver, as specified in the TCG PC
> Client Platform TPM Profile (PTP) specification for TPM 2.0 v1.04
> revision 14, section 8, I2C Interface Definition.
>

> +static const struct i2c_device_id tpm_tis_i2c_id[] = {
> + { "tpm_tis_i2c", 0 },
> + {}
> +};
> +MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
> +
> +static const struct of_device_id of_tis_i2c_match[] = {
> + { .compatible = "infineon,slb9673", },
> + { .compatible = "tcg,tpm-tis-i2c", },
> + {}
> +};
> +MODULE_DEVICE_TABLE(of, of_tis_i2c_match);
> +
> +static struct i2c_driver tpm_tis_i2c_driver = {
> + .driver = {
> + .owner = THIS_MODULE,
> + .name = "tpm_tis_i2c",
> + .pm = &tpm_tis_pm,
> + .of_match_table = of_match_ptr(of_tis_i2c_match),

of_match_ptr does not match your of_device_id table - you will have
warnings. Either mark them maybe_unused or skip of_match_ptr.


Best regards,
Krzysztof