From: Conor Dooley <conor@kernel.org>
To: "G.N. Zhou (OSS)" <guoniu.zhou@oss.nxp.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Frank Li <frank.li@nxp.com>,
Vladimir Zapolskiy <vz@mleia.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"G.N. Zhou" <guoniu.zhou@nxp.com>
Subject: Re: [PATCH v6 1/4] dt-bindings: media: ti,ds90ub953: Add support for remote GPIO data source
Date: Mon, 27 Apr 2026 20:22:24 +0100 [thread overview]
Message-ID: <20260427-village-snub-0ba825a90289@spud> (raw)
In-Reply-To: <AS8PR04MB9080CEB000F4F1C9043E8C21FA362@AS8PR04MB9080.eurprd04.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 5620 bytes --]
On Mon, Apr 27, 2026 at 08:12:10AM +0000, G.N. Zhou (OSS) wrote:
> Hi Conor,
>
> Thanks for your review.
>
> > -----Original Message-----
> > From: Conor Dooley <conor@kernel.org>
> > Sent: Saturday, April 25, 2026 1:09 AM
> > To: G.N. Zhou (OSS) <guoniu.zhou@oss.nxp.com>
> > Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>; Mauro Carvalho
> > Chehab <mchehab@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof
> > Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Frank
> > Li <frank.li@nxp.com>; Vladimir Zapolskiy <vz@mleia.com>; Linus Walleij
> > <linusw@kernel.org>; Bartosz Golaszewski <brgl@kernel.org>; linux-
> > media@vger.kernel.org; devicetree@vger.kernel.org; linux-
> > kernel@vger.kernel.org; imx@lists.linux.dev; linux-gpio@vger.kernel.org; G.N.
> > Zhou <guoniu.zhou@nxp.com>
> > Subject: Re: [PATCH v6 1/4] dt-bindings: media: ti,ds90ub953: Add support for
> > remote GPIO data source
> >
> > On Fri, Apr 24, 2026 at 09:42:24AM +0800, Guoniu Zhou wrote:
> > > From: Guoniu Zhou <guoniu.zhou@nxp.com>
> > >
> > > The DS90UB953 supports four pins, GPIO0 through GPIO3. When enabled as
> > > an output, it can be programed to output local data or remote data
> > > coming from the remote compatible deserializer.
> > >
> > > Add GPIO flag in second cell to select remote GPIO data source.
> > >
> > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > ---
> > > Changes in v6:
> > > - Added GPIO_DATA_SOURCE_REMOTE flag to dt-bindings/gpio/gpio.h
> > > - Updated dt-bindings documentation accordingly
> > > - Dropped Reviewed-by tag from Rob Herring due to significant binding
> > > change
> > >
> > > Changes in v5:
> > > - Improve the description for "#gpio-cells" as commented by Conor.
> > >
> > > Changes in v4:
> > > - Use folder block instead of literal block for #gpio-cell property description.
> > >
> > > Changes in v3:
> > > - Make GPIO range from 0-3 to 0-7 to support GPIO data from remote
> > > compatible deserializer suggested by Rob instead of adding third
> > > cell for GPIO controller.
> > >
> > > Changes in v2:
> > > - Remove new property ti,gpio-data
> > > - Add third cell for GPIO controller to select GPIO output source.
> > > ---
> > > Documentation/devicetree/bindings/media/i2c/ti,ds90ub953.yaml | 6 ++++-
> > -
> > > include/dt-bindings/gpio/gpio.h | 8 ++++++++
> > > 2 files changed, 12 insertions(+), 2 deletions(-)
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953.yaml
> > > b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953.yaml
> > > index 2e129bf573b7..da63771bc236 100644
> > > --- a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953.yaml
> > > +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953.yaml
> > > @@ -21,8 +21,10 @@ properties:
> > > '#gpio-cells':
> > > const: 2
> > > description:
> > > - First cell is the GPIO pin number, second cell is the flags. The GPIO pin
> > > - number must be in range of [0, 3].
> > > + First cell is the GPIO pin number (0-3) and the second cell is used
> > > + to specify flags. See <dt-bindings/gpio/gpio.h> for available flags
> > > + including GPIO_DATA_SOURCE_REMOTE for remote GPIO data source.
> > > + Flags can be OR'd together.
> > >
> > > gpio-controller: true
> > >
> > > diff --git a/include/dt-bindings/gpio/gpio.h
> > > b/include/dt-bindings/gpio/gpio.h index b5d531237448..d04a494d96ad
> > > 100644
> > > --- a/include/dt-bindings/gpio/gpio.h
> > > +++ b/include/dt-bindings/gpio/gpio.h
> > > @@ -42,4 +42,12 @@
> > > /* Bit 6 express pull disable */
> > > #define GPIO_PULL_DISABLE 64
> > >
> > > +/*
> > > + * Bit 24 indicates the GPIO data source is from a remote device.
> >
> > Why 24, not 7?
>
> Good question. I chose bit 24 for the following reasons:
> - There is no clear guidance in the documentation on how to add custom
> GPIO flags, so I wanted to ensure sufficient separation from the generic
> GPIO flags to avoid potential conflicts.
> - The generic GPIO flags currently use the lower bits (0-6). By using
> bit 24, I'm leaving ample room (bits 7-23) for future expansion of
> generic flags without risking collision.
> - This also reserves space (bits 25-31) for potential future custom
> flags that may be needed by this or other drivers.
>
> However, if there's a preferred convention or range for driver-specific
> GPIO flags that I'm not aware of, I'm happy to adjust this.
>
> >
> > > + * This is used in serializer/deserializer setups where the GPIO pin
> > > + * on the local device (e.g., TI DS90UB953 serializer) reflects the
> > > + * state of a GPIO on the remote device (e.g., TI DS90UB960 deserializer).
> > > + */
> > > +#define GPIO_DATA_SOURCE_REMOTE 0x01000000
> >
> > And why the divergent formatting compared to other defines in this file?
>
> You're right about the formatting inconsistency.
>
> The existing decimal notation (8, 16, 32, 64) works well for lower bits, but
> 16777216 (decimal for bit 24) is much less readable than 0x01000000. It's
> also harder to verify correctness and more error-prone.
>
> If consistency with the existing style is preferred, I can use decimal, but
> I'd suggest considering updating all these defines to use BIT() hex for better
> Readability and maintainability. What's your preference?
FWIW, I'm not ignoring you, but I won't reply until the more important
discussion with Linus has been resolved.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-04-27 19:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 1:42 [PATCH v6 0/4] media: i2c: ds90ub953: Add back channel GPIO support Guoniu Zhou
2026-04-24 1:42 ` [PATCH v6 1/4] dt-bindings: media: ti,ds90ub953: Add support for remote GPIO data source Guoniu Zhou
2026-04-24 17:09 ` Conor Dooley
2026-04-27 8:12 ` G.N. Zhou (OSS)
2026-04-27 19:22 ` Conor Dooley [this message]
2026-04-26 8:36 ` Linus Walleij
2026-04-27 9:12 ` G.N. Zhou (OSS)
2026-04-27 20:50 ` Linus Walleij
2026-04-28 6:17 ` G.N. Zhou (OSS)
2026-04-28 6:54 ` Tomi Valkeinen
2026-04-29 18:59 ` Linus Walleij
2026-04-24 1:42 ` [PATCH v6 2/4] media: i2c: ds90ub953: Add back channel GPIO support Guoniu Zhou
2026-04-24 1:42 ` [PATCH v6 3/4] media: i2c: ds90ub953: use devm_mutex_init() to simplify code Guoniu Zhou
2026-04-24 8:14 ` Bartosz Golaszewski
2026-04-24 1:42 ` [PATCH v6 4/4] media: i2c: ds90ub953: use guard() " Guoniu Zhou
2026-04-24 8:15 ` Bartosz Golaszewski
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=20260427-village-snub-0ba825a90289@spud \
--to=conor@kernel.org \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=frank.li@nxp.com \
--cc=guoniu.zhou@nxp.com \
--cc=guoniu.zhou@oss.nxp.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=vz@mleia.com \
/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