All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
To: linux-media@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org,
	"Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
	"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
	"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
	"Thomas Nizan" <tnizan@witekio.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	devicetree@vger.kernel.org
Subject: [PATCH v3 01/12] dt-bindings: media: i2c: max9286: Add support for per-port supplies
Date: Thu, 15 Dec 2022 01:38:14 +0200	[thread overview]
Message-ID: <20221214233825.13050-2-laurent.pinchart+renesas@ideasonboard.com> (raw)
In-Reply-To: <20221214233825.13050-1-laurent.pinchart+renesas@ideasonboard.com>

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: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes since v2:

- Make maxim,gpio-poc and port[0-3]-poc-supply mutually exclusive

Changes since v1:

- Simplify mutual exclusion condition
---
 .../bindings/media/i2c/maxim,max9286.yaml     | 35 +++++++++++++------
 1 file changed, 25 insertions(+), 10 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
index 90315e217003..4f28690eabcd 100644
--- a/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
+++ b/Documentation/devicetree/bindings/media/i2c/maxim,max9286.yaml
@@ -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:
-  required:
-    - maxim,gpio-poc
-then:
-  properties:
-    poc-supply: false
-    gpio-controller: false
+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
 
-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2022-12-14 23:38 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 23:38 [PATCH v3 00/12] media: i2c: max9286: Small new features Laurent Pinchart
2022-12-14 23:38 ` Laurent Pinchart [this message]
2022-12-14 23:38 ` [PATCH v3 02/12] dt-bindings: media: i2c: max9286: Add property to select I2C speed Laurent Pinchart
2022-12-15 13:24   ` Rob Herring
2022-12-15 13:43     ` Laurent Pinchart
2022-12-15 16:22       ` Rob Herring
2022-12-15 16:46         ` Laurent Pinchart
2022-12-16  0:45   ` [PATCH v3.1 " Laurent Pinchart
2022-12-16 10:05     ` Jacopo Mondi
2022-12-14 23:38 ` [PATCH v3 03/12] dt-bindings: media: i2c: max9286: Add property to select bus width Laurent Pinchart
2022-12-14 23:38 ` [PATCH v3 04/12] media: i2c: max9286: Add support for port regulators Laurent Pinchart
2022-12-16  9:52   ` Jacopo Mondi
2022-12-19  2:03     ` Laurent Pinchart
2022-12-19  2:18   ` [PATCH v3.1 " Laurent Pinchart
2022-12-19  7:40     ` Jacopo Mondi
2022-12-14 23:38 ` [PATCH v3 05/12] media: i2c: max9286: Support manual framesync operation Laurent Pinchart
2022-12-14 23:38 ` [PATCH v3 06/12] media: i2c: max9286: Rename MAX9286_DATATYPE_RAW11 to RAW12 Laurent Pinchart
2022-12-14 23:38 ` [PATCH v3 07/12] media: i2c: max9286: Support 12-bit raw bayer formats Laurent Pinchart
2022-12-16  9:58   ` Jacopo Mondi
2022-12-14 23:38 ` [PATCH v3 08/12] media: i2c: max9286: Define macros for all bits of register 0x15 Laurent Pinchart
2022-12-14 23:38 ` [PATCH v3 09/12] media: i2c: max9286: Configure remote I2C speed from device tree Laurent Pinchart
2022-12-16 10:03   ` Jacopo Mondi
2022-12-14 23:38 ` [PATCH v3 10/12] media: i2c: max9286: Configure bus width " Laurent Pinchart
2022-12-14 23:38 ` [PATCH v3 11/12] media: i2c: max9286: Select HS as data enable signal Laurent Pinchart
2022-12-14 23:38 ` [PATCH v3 12/12] media: i2c: max9286: Print power-up GMSL link configuration Laurent Pinchart

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=20221214233825.13050-2-laurent.pinchart+renesas@ideasonboard.com \
    --to=laurent.pinchart+renesas@ideasonboard.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=niklas.soderlund@ragnatech.se \
    --cc=robh+dt@kernel.org \
    --cc=tnizan@witekio.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.