[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210415165309.GA1535842@robh.at.kernel.org>
Date: Thu, 15 Apr 2021 11:53:09 -0500
From: Rob Herring <robh@...nel.org>
To: Jacopo Mondi <jacopo+renesas@...ndi.org>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
Magnus Damm <magnus.damm@...il.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Kieran Bingham <kieran.bingham@...asonboard.com>,
linux-renesas-soc@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/7] dt-bindings: media: max9286: Define
'maxim,gpio-poc'
On Thu, Apr 15, 2021 at 02:25:57PM +0200, Jacopo Mondi wrote:
> Define a new vendor property in the maxim,max9286 binding schema.
>
> The new property allows to declare that the remote camera
> power-over-coax is controlled by one of the MAX9286 gpio lines.
>
> As it is currently not possible to establish a regulator as consumer
> of the MAX9286 gpio controller for this purpose, the property allows to
> declare that the camera power is controlled by the MAX9286 directly.
>
> The property accepts a gpio-index (0 or 1) and one line polarity
> flag as defined by dt-bindings/gpio/gpio.h.
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo+renesas@...ndi.org>
> ---
> .../bindings/media/i2c/maxim,max9286.yaml | 71 ++++++++++++++++++-
> 1 file changed, 70 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> index 0e7162998b77..e2422241b7d0 100644
> --- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> +++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
> @@ -70,6 +70,28 @@ properties:
> a remote serializer whose high-threshold noise immunity is not enabled
> is 100000 micro volts
>
> + maxim,gpio-poc:
> + $ref: '/schemas/types.yaml#/definitions/uint32-array'
> + minItems: 2
> + maxItems: 2
> + description: |
> + Index of the MAX9286 gpio output line (0 or 1) that controls Power over
> + Coax to the cameras and its associated polarity flag.
> +
> + The property accepts an array of two unsigned integers, the first being
> + the gpio line index (0 or 1) and the second being the gpio line polarity
> + flag (GPIO_ACTIVE_HIGH or GPIO_ACTIVE_LOW) as defined in
> + <include/dt-bindings/gpio/gpio.h>.
> +
> + When the remote cameras power is controlled by one of the MAX9286 gpio
> + lines, this property has to be used to specify which line among the two
> + available ones controls the remote camera power enablement.
> +
> + When this property is used it is not possible to register a gpio
> + controller as the gpio lines are controlled directly by the MAX9286 and
> + not available for consumers, nor the 'poc-supply' property should be
> + specified.
> +
> ports:
> $ref: /schemas/graph.yaml#/properties/ports
>
> @@ -182,7 +204,20 @@ required:
> - reg
> - ports
> - i2c-mux
> - - gpio-controller
> +
> +# If 'maxim,gpio-poc' is present, then 'poc-supply' and 'gpio-controller'
> +# are not allowed.
> +if:
> + required:
> + - maxim,gpio-poc
> +then:
> + allOf:
> + - not:
> + required:
> + - poc-supply
> + - not:
> + required:
> + - gpio-controller
I did tell you to do it this way on irc, but looking at it again, it's
slightly more concise to do:
properties:
poc-supply: false
gpio-controller: false
Note that 'properties' in the 'if' doesn't work because a schema
for a property evaluates as true when the property is not present.
Either way,
Reviewed-by: Rob Herring <robh@...nel.org>
Rob
Powered by blists - more mailing lists