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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Sep 2022 13:31:25 +0200
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     ChiaEn Wu <peterwu.pub@...il.com>, sre@...nel.org,
        robh+dt@...nel.org, krzysztof.kozlowski+dt@...aro.org
Cc:     chiaen_wu@...htek.com, cy_huang@...htek.com,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: power: supply: Add Richtek RT9467
 battery charger

On 29/09/2022 12:37, ChiaEn Wu wrote:
> From: ChiaEn Wu <chiaen_wu@...htek.com>
> 
> Add bindings for the Richtek RT9467 battery charger.
> 
> Co-developed-by: ChiYuan Huang <cy_huang@...htek.com>
> Signed-off-by: ChiYuan Huang <cy_huang@...htek.com>
> Signed-off-by: ChiaEn Wu <chiaen_wu@...htek.com>
> ---

Thank you for your patch. There is something to discuss/improve.

> +
> +  reg:
> +    maxItems: 1
> +
> +  wakeup-source: true
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  charge-enable-gpios:
> +    description: GPIO is used to turn on and off charging.
> +    maxItems: 1
> +
> +  usb-otg-vbus-regulator:
> +    type: object
> +    description: OTG boost regulator.
> +    unevaluatedProperties: false
> +    $ref: /schemas/regulator/regulator.yaml#
> +
> +    properties:
> +      enable-gpios:
> +        maxItems: 1

maxItems are coming from gpio-consumer-common.yaml, so just
enable-gpios: true

> +
> +required:
> +  - compatible
> +  - reg
> +  - wakeup-source
> +  - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      rt9467@5b {

Node names should be generic.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +        compatible = "richtek,rt9467-charger";
> +        reg = <0x5b>;
> +        wakeup-source;
> +        interrupts-extended = <&gpio_intc 32 IRQ_TYPE_LEVEL_LOW>;
> +        charge-enable-gpios = <&gpio26 1 0>;

Use defines for GPIO flags.

> +
> +        rt9467_otg_vbus: usb-otg-vbus-regulator {
> +          regulator-name = "rt9467-usb-otg-vbus";
> +          regulator-min-microvolt = <4425000>;
> +          regulator-max-microvolt = <5825000>;
> +          regulator-min-microamp = <500000>;
> +          regulator-max-microamp = <3000000>;
> +        };
> +      };
> +    };

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ