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:   Fri, 11 Feb 2022 20:18:09 +0530
From:   "Satya Priya Kakitapalli (Temp)" <quic_c_skakit@...cinc.com>
To:     Matti Vaittinen <mazziesaccount@...il.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        "Krzysztof Kozlowski" <krzysztof.kozlowski@...onical.com>
CC:     Lee Jones <lee.jones@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Das Srinagesh <gurus@...eaurora.org>,
        <linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <swboyd@...omium.org>,
        <quic_collinsd@...cinc.com>, <quic_subbaram@...cinc.com>,
        <quic_jprakash@...cinc.com>
Subject: Re: [PATCH V5 4/6] regulator: Add a regulator driver for the PM8008
 PMIC

Hi Matti,


Thanks for reviewing the patches!


On 2/11/2022 4:31 PM, Matti Vaittinen wrote:
> Hi Satya,
>
> It's always nice to see new PMIC drivers :) I just one question after 
> reading your patch - please ignore it if it has already been discussed 
> before - for some reason this version was caught by my filters where 
> the previous versions didn't. It means I do not know the full history.
> On 2/8/22 16:52, Satya Priya wrote:
>> Qualcomm Technologies, Inc. PM8008 is an I2C controlled PMIC
>> containing 7 LDO regulators.  Add a PM8008 regulator driver to
>> support PMIC regulator management via the regulator framework.
>>
>> Signed-off-by: Satya Priya <quic_c_skakit@...cinc.com>
>> ---
>
> snip
>
>> +
>> +static int pm8008_regulator_of_parse(struct device_node *node,
>> +            const struct regulator_desc *desc,
>> +            struct regulator_config *config)
>> +{
>> +    struct pm8008_regulator *pm8008_reg = config->driver_data;
>> +    int rc;
>> +    unsigned int reg;
>> +
>> +    /* get slew rate */
>> +    rc = regmap_bulk_read(pm8008_reg->regmap,
>> +            LDO_STEPPER_CTL_REG(pm8008_reg->base), &reg, 1);
>> +    if (rc < 0) {
>> +        dev_err(pm8008_reg->dev,
>> +            "%s: failed to read step rate configuration rc=%d\n",
>> +            pm8008_reg->rdesc.name, rc);
>> +        return rc;
>> +    }
>> +    reg &= STEP_RATE_MASK;
>> +    pm8008_reg->step_rate = DEFAULT_VOLTAGE_STEPPER_RATE >> reg;
>> +
>> +    return 0;
>> +}
>
> I wonder why this is done in the of_parse_cb? Could this perhaps be 
> done directly in probe - I don't think this is actually parsing the 
> device_node properties, right?
>

Right, I will move this part to probe. In the previous version there was 
some code here which did the DT parsing, now that I removed all that, I 
should move this to probe.


Thanks,

Satya Priya


> Overall this looks pretty nice to me.
>
> Best Regards
>     -- Matti
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ