Re: [PATCH v6 1/4] dt-bindings: media: ti,ds90ub953: Add support for remote GPIO data source

Linus Walleij
2026-04-27T20:50:37Z

On Mon, Apr 27, 2026 at 11:13 AM G.N. Zhou (OSS)
<guoniu.zhou@oss.nxp.com> wrote:
> [Me]

> > I understand that the driver needs to deal with this in a per-gpio-line basis
> > though, have you considered:
> >
> > 1. Just hard-coding this into the driver based on the .compatible
> > string, if the remote GPIOs are always the same for this TI thing?
> >
> > 2. If it is just for one particular system, you *could* actually have
> > a table/mask inside the driver for this:
> > if (of_machine_is_compatible("my-funky-system")) which will
> > kick in only on that very machine,
> >
> > 3. If you really want to store the information in the media i2c
> > device node, add some custom property like this:
> > ti,remote-sources = <0x0000001f>;
> > where a bit is set to 1 for each GPIO which is remote.
> >
> > Putting flags on the GPIO lines themselves seems too complex and system-
> > specific.
>
> Thank you for the detailed feedback.
>
> After considering your suggestions, I think option 3 (custom device property)
> is the most appropriate approach for this case.

Why is that the most appropriate?

I think (1) is most appropriate, if the hardware with this compatible
always looks like this. You need to answer the question if this
is a per-system flag for the GPIO lines or something that is *always*
applicable for a device with compatible ti,ds90ub9NN-q1?

If it for example always applies to ti,ds90ub971-q1, then make that
compatible decide how to handle indvidual line, just write
code for it. That is case (1).

If this setting depends on how the serializer is integrated and the
remote setting may apply to some systems with this device and not others,
you have options (2) and (3).

> However, I initially implemented this using a custom device property
> (ti,gpio-data) in v1 [1], and Vladimir rejected that approach.

Vladimir is saying that the driver code should handle this
without any extra DT properties. That can be done with approach
(1) and (2). But I don't know about that.

I think the basic problem with the patch is that no-one (myself included)
apart from you understand what a remote serializer is, why it is
remote and what that means, how the mechanism between the
components making up this essentially works etc. I.e. a much
longer and more detailed commit message and binding explaining
very cleary what this is and how it works and why the special
property is needed on some lines, and how it is a property
of some specific way of integrating this GPIO controller.

If a custom property should be used ti,gpio-data is too generic,
come up with a property name that actually says what it is all
about and which anyone would understand. "gpio-data" is a
bit "the thing that does the thing" and overly generic term.

Yours,
Linus Walleij