Re: [PATCH] dt-bindings: display: ssd1307fb: Convert to json-schema

2021-05-24 Thread Maxime Ripard
Hi

On Tue, May 18, 2021 at 04:49:45PM +0200, Geert Uytterhoeven wrote:
> On Tue, May 18, 2021 at 4:33 PM Maxime Ripard  wrote:
> > On Tue, May 18, 2021 at 09:51:31AM +0200, Geert Uytterhoeven wrote:
> > > Convert the Solomon SSD1307 Framebuffer Device Tree binding
> > > documentation to json-schema.
> > >
> > > Fix the spelling of the "pwms" property.
> > > Document default values.
> > > Make properties with default values not required.
> > >
> > > Signed-off-by: Geert Uytterhoeven 
> > > ---
> > > I have listed Maxime as the maintainer, as he wrote the original driver
> > > and bindings.  Maxime: Please scream if this is inappropriate ;-)
> >
> > Fine by me :)
> 
> Thanks!
> 
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> 
> > > +  solomon,dclk-div:
> > > +$ref: /schemas/types.yaml#/definitions/uint32
> > > +minimum: 1
> > > +maximum: 16
> > > +description:
> > > +  Clock divisor. The default value is controller-dependent.
> >
> > I guess we could document the default using an if / else statement?
> 
> While clk-div has only two different defaults, dclk-frq has different
> defaults for each of the 4 variants supported.
> 
> Do you think it's worthwhile doing that? All upstream DTS files lack
> these properties, thus use the default values.

I'd say it's even more important if everyone relies on it :)

Maxime


signature.asc
Description: PGP signature


Re: [PATCH] dt-bindings: display: ssd1307fb: Convert to json-schema

2021-05-19 Thread Rob Herring
On Tue, 18 May 2021 09:51:31 +0200, Geert Uytterhoeven wrote:
> Convert the Solomon SSD1307 Framebuffer Device Tree binding
> documentation to json-schema.
> 
> Fix the spelling of the "pwms" property.
> Document default values.
> Make properties with default values not required.
> 
> Signed-off-by: Geert Uytterhoeven 
> ---
> I have listed Maxime as the maintainer, as he wrote the original driver
> and bindings.  Maxime: Please scream if this is inappropriate ;-)
> ---
>  .../bindings/display/solomon,ssd1307fb.yaml   | 166 ++
>  .../devicetree/bindings/display/ssd1307fb.txt |  60 ---
>  2 files changed, 166 insertions(+), 60 deletions(-)
>  create mode 100644 
> Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/ssd1307fb.txt
> 

Reviewed-by: Rob Herring 


Re: [PATCH] dt-bindings: display: ssd1307fb: Convert to json-schema

2021-05-18 Thread Geert Uytterhoeven
Hi Maxime,

On Tue, May 18, 2021 at 4:33 PM Maxime Ripard  wrote:
> On Tue, May 18, 2021 at 09:51:31AM +0200, Geert Uytterhoeven wrote:
> > Convert the Solomon SSD1307 Framebuffer Device Tree binding
> > documentation to json-schema.
> >
> > Fix the spelling of the "pwms" property.
> > Document default values.
> > Make properties with default values not required.
> >
> > Signed-off-by: Geert Uytterhoeven 
> > ---
> > I have listed Maxime as the maintainer, as he wrote the original driver
> > and bindings.  Maxime: Please scream if this is inappropriate ;-)
>
> Fine by me :)

Thanks!

> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml

> > +  solomon,dclk-div:
> > +$ref: /schemas/types.yaml#/definitions/uint32
> > +minimum: 1
> > +maximum: 16
> > +description:
> > +  Clock divisor. The default value is controller-dependent.
>
> I guess we could document the default using an if / else statement?

While clk-div has only two different defaults, dclk-frq has different
defaults for each of the 4 variants supported.

Do you think it's worthwhile doing that? All upstream DTS files lack
these properties, thus use the default values.

> Looks good otherwise :)

Thanks!

Gr{oetje,eeting}s,

Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds


Re: [PATCH] dt-bindings: display: ssd1307fb: Convert to json-schema

2021-05-18 Thread Maxime Ripard
Hi

On Tue, May 18, 2021 at 09:51:31AM +0200, Geert Uytterhoeven wrote:
> Convert the Solomon SSD1307 Framebuffer Device Tree binding
> documentation to json-schema.
> 
> Fix the spelling of the "pwms" property.
> Document default values.
> Make properties with default values not required.
> 
> Signed-off-by: Geert Uytterhoeven 
> ---
> I have listed Maxime as the maintainer, as he wrote the original driver
> and bindings.  Maxime: Please scream if this is inappropriate ;-)

Fine by me :)

> ---
>  .../bindings/display/solomon,ssd1307fb.yaml   | 166 ++
>  .../devicetree/bindings/display/ssd1307fb.txt |  60 ---
>  2 files changed, 166 insertions(+), 60 deletions(-)
>  create mode 100644 
> Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
>  delete mode 100644 Documentation/devicetree/bindings/display/ssd1307fb.txt
> 
> diff --git a/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml 
> b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> new file mode 100644
> index ..bd632d86a4f814a0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/solomon,ssd1307fb.yaml
> @@ -0,0 +1,166 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/solomon,ssd1307fb.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Solomon SSD1307 OLED Controller Framebuffer
> +
> +maintainers:
> +  - Maxime Ripard 
> +
> +properties:
> +  compatible:
> +enum:
> +  - solomon,ssd1305fb-i2c
> +  - solomon,ssd1306fb-i2c
> +  - solomon,ssd1307fb-i2c
> +  - solomon,ssd1309fb-i2c
> +
> +  reg:
> +maxItems: 1
> +
> +  pwms:
> +maxItems: 1
> +
> +  reset-gpios:
> +maxItems: 1
> +
> +  vbat-supply:
> +description: The supply for VBAT
> +
> +  solomon,height:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 16
> +description:
> +  Height in pixel of the screen driven by the controller
> +
> +  solomon,width:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 96
> +description:
> +  Width in pixel of the screen driven by the controller
> +
> +  solomon,page-offset:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 1
> +description:
> +  Offset of pages (band of 8 pixels) that the screen is mapped to
> +
> +  solomon,segment-no-remap:
> +type: boolean
> +description:
> +  Display needs normal (non-inverted) data column to segment mapping
> +
> +  solomon,col-offset:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 0
> +description:
> +  Offset of columns (COL/SEG) that the screen is mapped to
> +
> +  solomon,com-seq:
> +type: boolean
> +description:
> +  Display uses sequential COM pin configuration
> +
> +  solomon,com-lrremap:
> +type: boolean
> +description:
> +  Display uses left-right COM pin remap
> +
> +  solomon,com-invdir:
> +type: boolean
> +description:
> +  Display uses inverted COM pin scan direction
> +
> +  solomon,com-offset:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 0
> +description:
> +  Number of the COM pin wired to the first display line
> +
> +  solomon,prechargep1:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 2
> +description:
> +  Length of deselect period (phase 1) in clock cycles
> +
> +  solomon,prechargep2:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +default: 2
> +description:
> +  Length of precharge period (phase 2) in clock cycles.  This needs to be
> +  the higher, the higher the capacitance of the OLED's pixels is.
> +
> +  solomon,dclk-div:
> +$ref: /schemas/types.yaml#/definitions/uint32
> +minimum: 1
> +maximum: 16
> +description:
> +  Clock divisor. The default value is controller-dependent.

I guess we could document the default using an if / else statement?
Looks good otherwise :)

Maxime


signature.asc
Description: PGP signature