All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Artur Weber <aweber.kernel@gmail.com>
Cc: "Lee Jones" <lee@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Daniel Thompson" <daniel.thompson@linaro.org>,
	"Jingoo Han" <jingoohan1@gmail.com>,
	"Pavel Machek" <pavel@ucw.cz>, "Andy Gross" <agross@kernel.org>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Helge Deller" <deller@gmx.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org,
	~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH 1/4] dt-bindings: backlight: lp855x: convert to YAML and modernize
Date: Fri, 5 May 2023 15:20:10 -0500	[thread overview]
Message-ID: <20230505202010.GA3494651-robh@kernel.org> (raw)
In-Reply-To: <20230429104534.28943-2-aweber.kernel@gmail.com>

On Sat, Apr 29, 2023 at 12:45:31PM +0200, Artur Weber wrote:
> Notable changes:
> - ROM child nodes use dashes instead of underscores; the driver
>   reads all child nodes regardless of their names, so this doesn't
>   break ABI.
> - pwm-period argument is deprecated, as it effectively duplicates
>   the period value provided in pwms. The driver continues to accept
>   the property, so this should not break ABI.
> 
> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> ---
>  .../leds/backlight/lp855x-backlight.yaml      | 148 ++++++++++++++++++
>  .../bindings/leds/backlight/lp855x.txt        |  72 ---------
>  2 files changed, 148 insertions(+), 72 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
>  delete mode 100644 Documentation/devicetree/bindings/leds/backlight/lp855x.txt
> 
> diff --git a/Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
> new file mode 100644
> index 000000000000..dfe8131d2a32
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
> @@ -0,0 +1,148 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/backlight/lp855x-backlight.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments LP855X backlight controllers
> +
> +maintainers:
> +  - Artur Weber <aweber.kernel@gmail.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,lp8550
> +      - ti,lp8551
> +      - ti,lp8552
> +      - ti,lp8553
> +      - ti,lp8555
> +      - ti,lp8556
> +      - ti,lp8557
> +
> +  reg:
> +    maxItems: 1
> +
> +  dev-ctrl:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description:
> +      Value of device control register. This is a device-specific value.
> +
> +  bl-name:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Backlight device name.
> +
> +  init-brt:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: Initial value of backlight brightness.
> +
> +  power-supply:
> +    description: Regulator which controls the 3V rail.
> +
> +  enable-supply:
> +    description: Regulator which controls the EN/VDDIO input.
> +
> +  pwms:
> +    maxItems: 1
> +    description: |
> +      PWM channel to use for controlling the backlight; setting this
> +      enables the PWM-based backlight control mode.
> +
> +  pwm-names: true
> +
> +  pwm-period:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      PWM period value. Deprecated; set the period value in the pwms
> +      property instead.
> +    deprecated: true
> +
> +patternProperties:
> +  "^rom-[0-9a-f]{2}h$":
> +    type: object
> +    description: Nodes containing the values of configuration registers.

       additionalProperties: false

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +    properties:
> +      rom-addr:
> +        $ref: /schemas/types.yaml#/definitions/uint8
> +        description: Register address of ROM area to be updated.
> +
> +      rom-val:
> +        $ref: /schemas/types.yaml#/definitions/uint8
> +        description: Value to write to the ROM register.
> +
> +required:
> +  - compatible
> +  - reg
> +  - dev-ctrl
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        backlight@2c {
> +            compatible = "ti,lp8555";
> +            reg = <0x2c>;
> +
> +            dev-ctrl = /bits/ 8 <0x00>;
> +
> +            pwms = <&pwm 0 10000>;
> +            pwm-names = "lp8555";
> +
> +            /* 4V OV, 4 output LED0 string enabled */
> +            rom-14h {
> +              rom-addr = /bits/ 8 <0x14>;
> +              rom-val = /bits/ 8 <0xcf>;
> +            };
> +
> +            /* Heavy smoothing, 24ms ramp time step */
> +            rom-15h {
> +              rom-addr = /bits/ 8 <0x15>;
> +              rom-val = /bits/ 8 <0xc7>;
> +            };
> +
> +            /* 4 output LED1 string enabled */
> +            rom-19h {
> +              rom-addr = /bits/ 8 <0x19>;
> +              rom-val = /bits/ 8 <0x0f>;
> +            };
> +        };
> +    };
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        backlight@2c {
> +            compatible = "ti,lp8556";
> +            reg = <0x2c>;
> +
> +            bl-name = "lcd-bl";
> +            dev-ctrl = /bits/ 8 <0x85>;
> +            init-brt = /bits/ 8 <0x10>;
> +        };
> +      };
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        backlight@2c {
> +            compatible = "ti,lp8557";
> +            reg = <0x2c>;
> +            enable-supply = <&backlight_vddio>;
> +            power-supply = <&backlight_vdd>;
> +
> +            dev-ctrl = /bits/ 8 <0x41>;
> +            init-brt = /bits/ 8 <0x0a>;
> +
> +            /* 4V OV, 4 output LED string enabled */
> +            rom-14h {
> +              rom-addr = /bits/ 8 <0x14>;
> +              rom-val = /bits/ 8 <0xcf>;
> +            };
> +        };
> +    };

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Artur Weber <aweber.kernel@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
	"Daniel Thompson" <daniel.thompson@linaro.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	linux-pwm@vger.kernel.org, "Jingoo Han" <jingoohan1@gmail.com>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Lee Jones" <lee@kernel.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Konrad Dybcio" <konrad.dybcio@linaro.org>,
	linux-fbdev@vger.kernel.org, "Andy Gross" <agross@kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	~postmarketos/upstreaming@lists.sr.ht,
	"Pavel Machek" <pavel@ucw.cz>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-tegra@vger.kernel.org, "Helge Deller" <deller@gmx.de>,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH 1/4] dt-bindings: backlight: lp855x: convert to YAML and modernize
Date: Fri, 5 May 2023 15:20:10 -0500	[thread overview]
Message-ID: <20230505202010.GA3494651-robh@kernel.org> (raw)
In-Reply-To: <20230429104534.28943-2-aweber.kernel@gmail.com>

On Sat, Apr 29, 2023 at 12:45:31PM +0200, Artur Weber wrote:
> Notable changes:
> - ROM child nodes use dashes instead of underscores; the driver
>   reads all child nodes regardless of their names, so this doesn't
>   break ABI.
> - pwm-period argument is deprecated, as it effectively duplicates
>   the period value provided in pwms. The driver continues to accept
>   the property, so this should not break ABI.
> 
> Signed-off-by: Artur Weber <aweber.kernel@gmail.com>
> ---
>  .../leds/backlight/lp855x-backlight.yaml      | 148 ++++++++++++++++++
>  .../bindings/leds/backlight/lp855x.txt        |  72 ---------
>  2 files changed, 148 insertions(+), 72 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
>  delete mode 100644 Documentation/devicetree/bindings/leds/backlight/lp855x.txt
> 
> diff --git a/Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
> new file mode 100644
> index 000000000000..dfe8131d2a32
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/backlight/lp855x-backlight.yaml
> @@ -0,0 +1,148 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/backlight/lp855x-backlight.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments LP855X backlight controllers
> +
> +maintainers:
> +  - Artur Weber <aweber.kernel@gmail.com>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,lp8550
> +      - ti,lp8551
> +      - ti,lp8552
> +      - ti,lp8553
> +      - ti,lp8555
> +      - ti,lp8556
> +      - ti,lp8557
> +
> +  reg:
> +    maxItems: 1
> +
> +  dev-ctrl:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description:
> +      Value of device control register. This is a device-specific value.
> +
> +  bl-name:
> +    $ref: /schemas/types.yaml#/definitions/string
> +    description: Backlight device name.
> +
> +  init-brt:
> +    $ref: /schemas/types.yaml#/definitions/uint8
> +    description: Initial value of backlight brightness.
> +
> +  power-supply:
> +    description: Regulator which controls the 3V rail.
> +
> +  enable-supply:
> +    description: Regulator which controls the EN/VDDIO input.
> +
> +  pwms:
> +    maxItems: 1
> +    description: |
> +      PWM channel to use for controlling the backlight; setting this
> +      enables the PWM-based backlight control mode.
> +
> +  pwm-names: true
> +
> +  pwm-period:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    description:
> +      PWM period value. Deprecated; set the period value in the pwms
> +      property instead.
> +    deprecated: true
> +
> +patternProperties:
> +  "^rom-[0-9a-f]{2}h$":
> +    type: object
> +    description: Nodes containing the values of configuration registers.

       additionalProperties: false

With that,

Reviewed-by: Rob Herring <robh@kernel.org>

> +    properties:
> +      rom-addr:
> +        $ref: /schemas/types.yaml#/definitions/uint8
> +        description: Register address of ROM area to be updated.
> +
> +      rom-val:
> +        $ref: /schemas/types.yaml#/definitions/uint8
> +        description: Value to write to the ROM register.
> +
> +required:
> +  - compatible
> +  - reg
> +  - dev-ctrl
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        backlight@2c {
> +            compatible = "ti,lp8555";
> +            reg = <0x2c>;
> +
> +            dev-ctrl = /bits/ 8 <0x00>;
> +
> +            pwms = <&pwm 0 10000>;
> +            pwm-names = "lp8555";
> +
> +            /* 4V OV, 4 output LED0 string enabled */
> +            rom-14h {
> +              rom-addr = /bits/ 8 <0x14>;
> +              rom-val = /bits/ 8 <0xcf>;
> +            };
> +
> +            /* Heavy smoothing, 24ms ramp time step */
> +            rom-15h {
> +              rom-addr = /bits/ 8 <0x15>;
> +              rom-val = /bits/ 8 <0xc7>;
> +            };
> +
> +            /* 4 output LED1 string enabled */
> +            rom-19h {
> +              rom-addr = /bits/ 8 <0x19>;
> +              rom-val = /bits/ 8 <0x0f>;
> +            };
> +        };
> +    };
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        backlight@2c {
> +            compatible = "ti,lp8556";
> +            reg = <0x2c>;
> +
> +            bl-name = "lcd-bl";
> +            dev-ctrl = /bits/ 8 <0x85>;
> +            init-brt = /bits/ 8 <0x10>;
> +        };
> +      };
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        backlight@2c {
> +            compatible = "ti,lp8557";
> +            reg = <0x2c>;
> +            enable-supply = <&backlight_vddio>;
> +            power-supply = <&backlight_vdd>;
> +
> +            dev-ctrl = /bits/ 8 <0x41>;
> +            init-brt = /bits/ 8 <0x0a>;
> +
> +            /* 4V OV, 4 output LED string enabled */
> +            rom-14h {
> +              rom-addr = /bits/ 8 <0x14>;
> +              rom-val = /bits/ 8 <0xcf>;
> +            };
> +        };
> +    };

  reply	other threads:[~2023-05-05 20:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-29 10:45 [PATCH 0/4] video: backlight: lp855x: modernize bindings Artur Weber
2023-04-29 10:45 ` Artur Weber
2023-04-29 10:45 ` [PATCH 1/4] dt-bindings: backlight: lp855x: convert to YAML and modernize Artur Weber
2023-04-29 10:45   ` Artur Weber
2023-05-05 20:20   ` Rob Herring [this message]
2023-05-05 20:20     ` Rob Herring
2023-04-29 10:45 ` [PATCH 2/4] video: backlight: lp855x: get PWM for PWM mode during probe Artur Weber
2023-04-29 10:45   ` Artur Weber
2023-06-14  8:39   ` Uwe Kleine-König
2023-06-14  8:39     ` Uwe Kleine-König
2023-06-16 15:29     ` Artur Weber
2023-06-16 15:29       ` Artur Weber
2023-06-16 16:41       ` Uwe Kleine-König
2023-06-16 16:41         ` Uwe Kleine-König
2023-04-29 10:45 ` [PATCH 3/4] ARM: dts: adapt to LP855X bindings changes Artur Weber
2023-04-29 10:45   ` Artur Weber
2023-04-29 11:14   ` Luca Weiss
2023-04-29 11:14     ` Luca Weiss
2023-04-29 10:45 ` [PATCH 4/4] arm64: " Artur Weber
2023-04-29 10:45   ` Artur Weber

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=20230505202010.GA3494651-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=aweber.kernel@gmail.com \
    --cc=daniel.thompson@linaro.org \
    --cc=deller@gmx.de \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jingoohan1@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=~postmarketos/upstreaming@lists.sr.ht \
    /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.