linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Martyn Welch <martyn.welch@collabora.com>,
	Bartosz Golaszewski <brgl@bgdev.pl>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	kernel@collabora.com, linux-gpio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] dt-bindings: gpio: pca95xx: add entry for pcal6534 and PI4IOE5V6534Q
Date: Wed, 31 Aug 2022 16:34:05 +0300	[thread overview]
Message-ID: <97b256a7-670f-c681-424d-854d15145d24@linaro.org> (raw)
In-Reply-To: <CACRpkdb1-LXwLdV3qLMc+i_VaLoJ-mTs=+0QtuJtNaQR_xVpxQ@mail.gmail.com>

On 31/08/2022 16:26, Linus Walleij wrote:
> On Tue, Aug 30, 2022 at 9:50 AM Krzysztof Kozlowski
> <krzysztof.kozlowski@linaro.org> wrote:
>> On 29/08/2022 16:39, Martyn Welch wrote:
>>> The NXP PCAL6534 is a 34-bit I2C I/O expander similar to the PCAL6524. The
>>> Diodes PI4IOE5V6534Q is a functionally identical chip provided by Diodes
>>> Inc.
>>>
>>> Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
>>
>> Then diodes should be followed by fallback (and use only one compatible
>> to bind).
> 
> Ugh I don't think we have done a very good job at providing fallbacks
> (several compatibles) for this hardware. Just looking at the list makes
> me suspicious.
> 
> The fallback scheme is pretty hard to maintain when vendors are a bit
> unclear on whether things are really compatible or not, and sometimes
> they are compatible but rather not say :(

If you have specific+fallback compatible (e.g. diodes,pi4ioe5v6534q,
nxp,pcal6534), you can always introduce changes in the driver because it
will match to the specific one (diodes). You could even introduce
incompatible changes, if you insist, and the effect would be the same as
adding now two compatibles in the driver.

In the same time having fallback saves you useless entries in the driver
like:
{ .compatible = "nxp,pca9556", .data = OF_953X( 8, 0), }
{ .compatible = "nxp,pca9557", .data = OF_953X( 8, 0), }

I mean, really, this will grow. I was not CC-ed on the driver change -
for some reason only on some pieces of patchset - so difficult to say
how it looks here, but judging by description ("identical chip") it is
exactly the same as above.

I don't insist on it, but for most of other pieces of complex devices
(SoC IP blocks) we follow such approach.

Best regards,
Krzysztof

  reply	other threads:[~2022-08-31 13:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220829133923.1114555-1-martyn.welch@collabora.com>
2022-08-29 13:39 ` [PATCH 2/5] dt-bindings: gpio: pca95xx: add entry for pcal6534 and PI4IOE5V6534Q Martyn Welch
2022-08-30  7:50   ` Krzysztof Kozlowski
2022-08-31 13:26     ` Linus Walleij
2022-08-31 13:34       ` Krzysztof Kozlowski [this message]
2022-09-08 12:06         ` Linus Walleij
2022-08-29 13:39 ` [PATCH 3/5] gpio: pca953x: Fix pca953x_gpio_set_pull_up_down() Martyn Welch
2022-08-31 12:35   ` Linus Walleij
2022-08-31 20:54   ` Andy Shevchenko
2022-08-29 13:39 ` [PATCH 4/5] gpio: pca953x: Swap if statements to save later complexity Martyn Welch
2022-08-31 12:36   ` Linus Walleij
2022-08-31 20:55   ` Andy Shevchenko
2022-08-29 13:39 ` [PATCH 5/5] gpio: pca953x: Add support for PCAL6534 and compatible Martyn Welch
2022-08-31 11:57   ` Bartosz Golaszewski
2022-08-31 16:30     ` Martyn Welch
2022-08-31 19:44       ` Bartosz Golaszewski
2022-08-31 21:02   ` Andy Shevchenko
2022-09-01 17:18     ` Martyn Welch

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=97b256a7-670f-c681-424d-854d15145d24@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=brgl@bgdev.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martyn.welch@collabora.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).