Re: [PATCH 3/3] dt-bindings: media: ov772x: Document endpoint props
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
Date: 2020-08-26 08:42:42
Also in:
linux-media, linux-renesas-soc
Hi Laurent, On Sat, Aug 22, 2020 at 2:36 AM Laurent Pinchart [off-list ref] wrote:
Hi Prabhakar, On Fri, Aug 21, 2020 at 12:37:35PM +0100, Lad, Prabhakar wrote:quoted
On Wed, Aug 19, 2020 at 2:54 PM Laurent Pinchart wrote:quoted
On Tue, Aug 18, 2020 at 02:20:12PM +0200, Jacopo Mondi wrote:quoted
Document endpoint properties for the parallel bus type and add them to the example. Specify a few constraints: - If the bus type is BT.656 no hsync or vsycn polarities can be specified. - If the bus width is 10 bits, not data-shift can be applied. Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org> --- .../devicetree/bindings/media/i2c/ov772x.yaml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+)diff --git a/Documentation/devicetree/bindings/media/i2c/ov772x.yaml b/Documentation/devicetree/bindings/media/i2c/ov772x.yaml index 75dad40f70cc..3fad5dffd19a 100644 --- a/Documentation/devicetree/bindings/media/i2c/ov772x.yaml +++ b/Documentation/devicetree/bindings/media/i2c/ov772x.yaml@@ -50,9 +50,47 @@ properties: bus-type: enum: [5, 6] + bus-width: + enum: [8, 10] + default: 10 + + data-shift: + enum: [0, 2] + default: 0 + + hsync-active: + enum: [0, 1] + default: 1 + + vsync-active: + enum: [0, 1] + default: 1 + + pclk-sample: + enum: [0, 1] + default: 1 + remote-endpoint: description: A phandle to the bus receiver's endpoint node. + allOf: + - if: + properties: + bus-type: + const: 6 + then: + properties: + hsync-active: false + vsync-active: false + + - if: + properties: + bus-width: + const: 10 + then: + properties: + data-shift: + const: 0I'd add a blank line here.quoted
required: - bus-typeShould some of the properties be required ? Possibly conditioned on bus-type ?Agreed, would be interesting to know how this can be handled (split out bus-type and add required properties for each) ?We can add required: statements to the above if/then/else.
Aha thanks for pointing out. (I hadn't come across such cases) Cheers, Prabhakar