devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Mark Brown <broonie@kernel.org>
Cc: Naga Sureshkumar Relli <nagasuresh.relli@microchip.com>,
	robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor.dooley@microchip.com, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] spi: dt-binding: add Microchip CoreQSPI compatible
Date: Thu, 4 Aug 2022 13:31:34 +0200	[thread overview]
Message-ID: <b9cc3290-f0cb-0423-7ff0-dae40b52a379@linaro.org> (raw)
In-Reply-To: <Yup4JLh00HZxFQLc@sirena.org.uk>

On 03/08/2022 15:29, Mark Brown wrote:
> On Wed, Aug 03, 2022 at 08:11:03AM +0200, Krzysztof Kozlowski wrote:
>> On 02/08/2022 15:13, Mark Brown wrote:
>>> On Tue, Aug 02, 2022 at 10:52:25AM +0200, Krzysztof Kozlowski wrote:
>>>> On 01/08/2022 11:42, Naga Sureshkumar Relli wrote:
> 
>>>>> +    oneOf:
>>>>> +      - description: Microchip's Polarfire SoC SPI controller.
>>>>> +        const: microchip,mpfs-spi
>>>>> +      - description: Microchip's Polarfire SoC QSPI controller.
> 
>>>> Useless descriptions - they repeat compatible. Just keep it as enum and
>>>> skip descriptions. What value do they bring?
> 
>>> Someone not familiar with the full Microchip product line might not be
>>> aware of the expansion of mpfs, it's not blindingly obvious.
> 
>> Then it should be explained in title/description of the binding, not in
>> compatible. This is the usual way of providing some text description,
>> not for each compatible by repeating the compatible text.
> 
> I'm not convinced this is a useful rule to try to enforce, and I'm not
> sure how well it will work if the same IP is used in several different
> places.  It's not clear to me what the benefit is intended to be.

First, the description here is really not adding any useful information.

"description: Microchip's Polarfire SoC SPI controller."
Microchip - already in comaptible
SPI controller - already in compatible and in device description

The only useful piece could be extending pfs to Polarfire SoC.

And now imagine every binding doing the same, adding such
acronym-explanations in every compatible list. Basically we loose easy
to read, compare, analyze and check for errors enum:
  enum
    - microchip,mpfs-spi
    - microchip,mpfs-qspi
    - microchip,coreqspi-rtl-v2
    - microchip,mpfs-some-more-spi
    - microchip,mpfs-even-newer-spi

into double-sized oneOf with additional descriptions each one explaining
"mpfs".

  oneOf:
    - description: Microchip's Polarfire SoC SPI controller.
      const: microchip,mpfs-spi
    - description: Microchip's Polarfire SoC QSPI controller.
      const: microchip,mpfs-qspi
    - description: Microchip's FPGA QSPI controller.
      const: microchip,coreqspi-rtl-v2
    - description: Microchip's Polarfire SoC some-more SPI controller.
      const: microchip,mpfs-some-more-spi
    - description: Microchip's Polarfire SoC even newer SPI controller.
      const: microchip,mpfs-even-newer-spi

Why do you need to explain "mpfs" more than once? Why explaining these
are SPI or QSPI controllers? It's obvious from compatible.

Just keep it simple and small. We all have too much code to look at...

Best regards,
Krzysztof

  reply	other threads:[~2022-08-04 11:31 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01  9:42 [PATCH 0/2] Add support for Microchip QSPI controller Naga Sureshkumar Relli
2022-08-01  9:42 ` [PATCH 1/2] spi: dt-binding: add Microchip CoreQSPI compatible Naga Sureshkumar Relli
2022-08-01 10:17   ` Conor.Dooley
2022-08-01 10:52     ` naga sureshkumar
2022-08-02  8:52   ` Krzysztof Kozlowski
2022-08-02 13:13     ` Mark Brown
2022-08-03  6:11       ` Krzysztof Kozlowski
2022-08-03  6:59         ` naga sureshkumar
2022-08-03  7:48           ` Krzysztof Kozlowski
2022-08-03 13:29         ` Mark Brown
2022-08-04 11:31           ` Krzysztof Kozlowski [this message]
2022-08-04 11:35             ` Krzysztof Kozlowski
2022-08-04 12:13             ` Mark Brown
2022-08-01  9:42 ` [PATCH 2/2] spi: microchip-core-qspi: Add support for microchip fpga qspi controllers Naga Sureshkumar Relli
2022-08-01 10:40   ` Conor.Dooley
2022-08-01 11:09     ` naga sureshkumar
2022-08-01 12:33     ` Mark Brown
2022-08-01 12:56       ` Conor.Dooley
2022-08-02  8:54   ` Krzysztof Kozlowski

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=b9cc3290-f0cb-0423-7ff0-dae40b52a379@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=broonie@kernel.org \
    --cc=conor.dooley@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=nagasuresh.relli@microchip.com \
    --cc=robh+dt@kernel.org \
    /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).