lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230308182111.GA3533712-robh@kernel.org>
Date:   Wed, 8 Mar 2023 12:21:11 -0600
From:   Rob Herring <robh@...nel.org>
To:     Svyatoslav Ryhel <clamor95@...il.com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Hans Verkuil <hverkuil-cisco@...all.nl>,
        Luca Ceresoli <luca.ceresoli@...tlin.com>,
        Jean Delvare <jdelvare@...e.de>,
        Sebastian Reichel <sebastian.reichel@...labora.com>,
        Daniel Jeong <gshark.jeong@...il.com>,
        Ldd-Mlp <ldd-mlp@...t.ti.com>, linux-media@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] dt-bindings: media: i2c: add lm3560 binding

On Wed, Mar 08, 2023 at 11:52:08AM +0200, Svyatoslav Ryhel wrote:
> Signed-off-by: Svyatoslav Ryhel <clamor95@...il.com>
> ---
>  .../bindings/media/i2c/ti,lm3560.yaml         | 130 ++++++++++++++++++
>  1 file changed, 130 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml b/Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml
> new file mode 100644
> index 000000000000..b3c2ccb83a30
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/ti,lm3560.yaml
> @@ -0,0 +1,130 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/i2c/ti,lm3560.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: TI LM3560 Synchronous Boost Flash Driver
> +
> +maintainers:
> +  - Daniel Jeong <gshark.jeong@...il.com>
> +  - Ldd-Mlp <ldd-mlp@...t.ti.com>
> +
> +description: |
> +  The LM3560 is a 2-MHz fixed frequency synchronous boost
> +  converter with two 1000-mA constant current drivers for
> +  high-current white LEDs. The dual highside current sources
> +  allow for grounded cathode LED operation and can be tied
> +  together for providing flash currents at up to 2 A through
> +  a single LED. An adaptive regulation method ensures the
> +  current for each LED remains in regulation and maximizes
> +  efficiency.
> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - ti,lm3559
> +          - ti,lm3560
> +
> +  reg:
> +    maxItems: 1
> +
> +  enable-gpios:
> +    maxItems: 1
> +
> +  ti,peak-current:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [0, 0x20, 0x40, 0x60]
> +    default: 0x60
> +    description: |
> +      Peak current can be set to 4 values 1.6A (0x00),
> +      2.3A (0x20), 3.0A (0x40) and 3.6A (0x60).

Pretty sure we have common properties for this.

> +
> +  ti,max-flash-timeout:
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    minimum: 32
> +    maximum: 1024
> +    default: 1024
> +    description: |
> +      Maximum flash timeout in ms with step 32ms.

And this too.

> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +required:
> +  - compatible
> +  - reg
> +  - '#address-cells'
> +  - '#size-cells'
> +
> +patternProperties:
> +  "^led@[01]$":
> +    type: object
> +    description: |
> +      Properties for a connected LEDs.
> +    properties:
> +      reg:
> +        minimum: 0
> +        maximum: 1
> +
> +      ti,max-flash-current:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        minimum: 62500
> +        maximum: 1000000
> +        default: 1000000
> +        description: |
> +          Maximum current in flash mode in uA with step 62500uA.

Or maybe it's these per LED settings that are common.

BTW, anything with units, should have a standard unit suffix.

> +
> +      ti,max-torch-current:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        minimum: 31250
> +        maximum: 250000
> +        default: 250000
> +        description: |
> +          Maximum current in tourch mode in uA with step 31250uA.
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    i2c {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        flash-led@53 {

led-controller@53

> +            compatible = "ti,lm3559";
> +            reg = <0x53>;
> +
> +            enable-gpios = <&gpio 219 GPIO_ACTIVE_HIGH>;
> +
> +            ti,peak-current = <0>;
> +            ti,max-flash-timeout = <1024>;
> +
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            led@0 {
> +                reg = <0>;
> +
> +                ti,max-flash-current = <562500>;
> +                ti,max-torch-current = <156250>;
> +            };
> +
> +            led@1 {
> +                reg = <1>;
> +
> +                ti,max-flash-current = <562500>;
> +                ti,max-torch-current = <156250>;
> +            };
> +        };
> +    };
> +...
> -- 
> 2.37.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ