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] [day] [month] [year] [list]
Date:   Tue, 28 Sep 2021 18:14:16 +0530
From:   skakit@...eaurora.org
To:     Mark Brown <broonie@...nel.org>
Cc:     Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Lee Jones <lee.jones@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>, mka@...omium.org,
        swboyd@...omium.org, Das Srinagesh <gurus@...eaurora.org>,
        David Collins <collinsd@...eaurora.org>, kgunda@...eaurora.org,
        Subbaraman Narayanamurthy <subbaram@...eaurora.org>,
        linux-arm-msm@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/4] regulator: dt-bindings: Add pm8008 regulator bindings

On 2021-09-17 21:18, Mark Brown wrote:
> On Fri, Sep 17, 2021 at 04:15:36PM +0530, Satya Priya wrote:
> 
>> +    properties:
>> +      reg:
>> +        maxItems: 1
>> +      regulator-name: true
>> +      regulator-min-microvolt: true
>> +      regulator-max-microvolt: true
> 
> You shouldn't be forcing these properties, it should be perfectly OK 
> for
> boards to have fixed voltages especially for example during bringup or
> for debugging.
> 

Okay. I will remove these.

>> +      qcom,min-dropout-voltage:
>> +        $ref: /schemas/types.yaml#/definitions/uint32
>> +        description:
>> +          Specifies the minimum voltage in microvolts that the parent
>> +          supply regulator must output, above the output of this
>> +          regulator.
> 
> If this is needed in DT it should be a generic property since most
> regulators have some requirement here however usually it's a fixed
> property of the silicon and should therefore just gets set in the
> regulator_desc as min_dropout_uV - I'd strongly recommend having a
> default there even if there's some requirement for it to be set per
> board.

Yeah, we are setting the default values for this(headroom_uv) from 
driver. Please see below

struct regulator_data {
      char        *name;
      char        *supply_name;
      int     min_uv;
      int     max_uv;
      int     min_dropout_uv;
};

static const struct regulator_data reg_data[PM8008_MAX_LDO] = {
      /* name  parent      min_uv  max_uv  headroom_uv */
     {"l1", "vdd_l1_l2",  528000, 1504000, 225000},
     {"l2", "vdd_l1_l2",  528000, 1504000, 225000},
     {"l3", "vdd_l3_l4", 1504000, 3400000, 200000},
     {"l4", "vdd_l3_l4", 1504000, 3400000, 200000},
     {"l5", "vdd_l5",    1504000, 3400000, 300000},
     {"l6", "vdd_l6",    1504000, 3400000, 300000},
     {"l7", "vdd_l7",    1504000, 3400000, 300000},
};

Inside Register LDO API:

pm8008_reg->rdesc.min_dropout_uV = reg_data[i].min_dropout_uv;
of_property_read_u32(reg_node, "qcom,min-dropout-voltage",
                   &pm8008_reg->rdesc.min_dropout_uV);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ