linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Steffen <Alexander.Steffen@infineon.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	<jarkko@kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-integrity@vger.kernel.org>
Cc: <peterhuewe@gmx.de>, <jgg@ziepe.ca>,
	<krzysztof.kozlowski+dt@linaro.org>,
	Johannes Holland <johannes.holland@infineon.com>,
	Amir Mizinski <amirmizi6@gmail.com>
Subject: Re: [PATCH v3 1/2] tpm: Add tpm_tis_i2c backend for tpm_tis_core
Date: Mon, 23 May 2022 10:55:45 +0200	[thread overview]
Message-ID: <8f0d2098-8c7f-2347-3004-bf3e422de3a3@infineon.com> (raw)
In-Reply-To: <02596f22-3d19-8872-75fd-2a8f563c8270@linaro.org>

On 22.05.22 10:30, Krzysztof Kozlowski wrote:
> On 20/05/2022 19:24, Alexander Steffen wrote:
>>
>> +MODULE_DEVICE_TABLE(i2c, tpm_tis_i2c_id);
>> +
>> +#ifdef CONFIG_OF
>> +static const struct of_device_id of_tis_i2c_match[] = {
>> +     { .compatible = "infineon,slb9673", },
>> +     { .compatible = "tcg,tpm_tis-i2c", },
> 
> Please run checkpatch on your patches. You add undocumented compatibles.

Sorry, the old infrastructure I had to do that automatically is not in 
place at the moment, so it slipped through.

> Without bindings, new compatibles and properties cannot be accepted, so NAK.

Could you be more specific as to what the correct solution is here? 
Usually, I'd just look at what the existing code does, but that is a 
little messy:



* socionext,synquacer-tpm-mmio is documented only in 
Documentation/devicetree/bindings/trivial-devices.yaml

* nuvoton,npct601 is documented in trivial-devices.yaml and is also 
mentioned in Documentation/devicetree/bindings/security/tpm/tpm-i2c.txt

* nuvoton,npct650 is only mentioned in tpm-i2c.txt, but appears nowhere 
in the code

* infineon,tpm_i2c_infineon appears only in tpm_i2c_infineon.c, but is 
documented nowhere

* tpm_tis_spi_main.c has all its compatibles documented in 
tpm_tis_spi.txt, except google,cr50, which is documented in 
google,cr50.txt, even though it has the same properties

* tpm_tis_i2c_cr50.c uses the exact same google,cr50, even though that 
is explicitly documented as a device "on SPI Bus" and lists 
spi-max-frequency as one of its required properties, which does not make 
any sense for an I2C device

* According to the feedback in 
https://patchwork.kernel.org/project/linux-integrity/patch/20220404081835.495-4-johannes.holland@infineon.com/#24801807, 
the text format, that is currently used everywhere in 
Documentation/devicetree/bindings/security/tpm/, is deprecated anyway 
and should be replaced by YAML



So would you be okay with just adding the compatibles from tpm_tis_i2c.c 
to trivial-devices.yaml, so that checkpatch does not complain anymore, 
and leave the cleanup of the mess above for later?



Kind regards

Alexander

  reply	other threads:[~2022-05-23  8:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-20 17:24 [PATCH v3 0/2] tpm_tis_i2c Alexander Steffen
2022-05-20 17:24 ` [PATCH v3 1/2] tpm: Add tpm_tis_i2c backend for tpm_tis_core Alexander Steffen
2022-05-22  8:30   ` Krzysztof Kozlowski
2022-05-23  8:55     ` Alexander Steffen [this message]
2022-05-23  9:32       ` Krzysztof Kozlowski
2022-05-23  9:44         ` Krzysztof Kozlowski
2022-05-23 16:10           ` Alexander Steffen
2022-05-23 16:18           ` Alexander Steffen
2022-05-23 20:07   ` Jarkko Sakkinen
2022-05-20 17:24 ` [PATCH v3 2/2] tpm: Add tpm_tis_verify_crc to the tpm_tis_phy_ops protocol layer Alexander Steffen
2022-05-23 20:08   ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8f0d2098-8c7f-2347-3004-bf3e422de3a3@infineon.com \
    --to=alexander.steffen@infineon.com \
    --cc=amirmizi6@gmail.com \
    --cc=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=johannes.holland@infineon.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).