Commit 48dd004e authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

media: dt-bindings: media: i2c: max9286: Add support for per-port supplies



Power supplies for the ports can be controlled per port depending on the
hardware design. Support per-port supplies in the DT bindings, mutually
exclusive with the global supply.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarJacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 82adfe34
Loading
Loading
Loading
Loading
+25 −10
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@ properties:
    maxItems: 1

  poc-supply:
    description: Regulator providing Power over Coax to the cameras
    description: Regulator providing Power over Coax to all the ports

  enable-gpios:
    description: GPIO connected to the \#PWDN pin with inverted polarity
@@ -182,21 +182,36 @@ properties:

            additionalProperties: false

patternProperties:
  "^port[0-3]-poc-supply$":
    description: Regulator providing Power over Coax for a particular port

required:
  - compatible
  - reg
  - ports
  - i2c-mux

# If 'maxim,gpio-poc' is present, then 'poc-supply' and 'gpio-controller'
# are not allowed.
if:
allOf:
  # Only one way of specifying power supplies is allowed: 'maxim,gpio-poc',
  # 'poc-supply' or per-port poc-supply. Additionally, if 'maxim,gpio-poc' is
  # present, then 'gpio-controller' isn't allowed.
  - if:
      required:
        - maxim,gpio-poc
    then:
      properties:
        poc-supply: false
        gpio-controller: false
      patternProperties:
        "^port[0-3]-poc-supply$": false

  - if:
      required:
        - poc-supply
    then:
      patternProperties:
        "^port[0-3]-poc-supply$": false

additionalProperties: false