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]
Message-ID: <def29b3f-b5a1-5f23-7727-1308f7033cff@quicinc.com>
Date:   Wed, 1 Jun 2022 16:48:52 +0530
From:   "Satya Priya Kakitapalli (Temp)" <quic_c_skakit@...cinc.com>
To:     Stephen Boyd <swboyd@...omium.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>
CC:     Lee Jones <lee.jones@...aro.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        <linux-arm-msm@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <quic_collinsd@...cinc.com>,
        <quic_subbaram@...cinc.com>, <quic_jprakash@...cinc.com>
Subject: Re: [PATCH V13 7/9] regulator: Add a regulator driver for the PM8008
 PMIC


On 6/1/2022 7:36 AM, Stephen Boyd wrote:
> Quoting Satya Priya Kakitapalli (Temp) (2022-05-30 03:33:47)
>> On 5/28/2022 2:32 AM, Stephen Boyd wrote:
>>> Quoting Satya Priya Kakitapalli (Temp) (2022-05-27 01:24:19)
>>>> On 5/21/2022 8:26 AM, Stephen Boyd wrote:
>>>>           +       }
>>>>           +
>>>>           +       pm8008_reg->dev = dev;
>>>>           +
>>>>           +       rc = of_property_read_string(dev->of_node, "regulator-name", &name);
>>>>           +       if (rc)
>>>>           +               return rc;
>>>>           +
>>>>           +       /* get the required regulator data */
>>>>           +       for (i = 0; i < ARRAY_SIZE(reg_data); i++)
>>>>           +               if (strstr(name, reg_data[i].name))
>>>>
>>>>       Why not find this via reg/address instead? It would save storing the
>>>>       regulator name in the reg_data table.
>>>>
>>>>
>>>> You mean match this using base address? then we should add base address in the
>>>> reg_data table. We will need the name to be stored in reg_data table anyway for
>>>> the pm8008_reg->rdesc.of_match
>>> Why? Now that this driver binds to each node individually the usage of
>>> of_match doesn't make any sense to me. Can you set 'struct
>>> regulator_config::dev' instead and not set of_match?
>>
>> Currently we are setting regulator_config::dev as dev->parent i.e.,
>> pm8008@8, because the parent supplies are present under pm8008@8, to get
>> the regulators mapped correctly to the parent supplies we are using
>> dev->parent.
>>
>> If we do not set of_match in regulator descriptor,
>> regulator_of_get_init_node() would return NULL, causing init_data to be
>> NULL during regulator_register and regulators are not getting probed.
>> This can be resolved, if we get the init_data during pm8008_probe
>> itself. I'll do that in the next version.
>>
> Ok then it seems ok to leave it as is. I suspect getting init data
> during probe is more code vs. having the node name and the address in
> the table.


Okay. If we are leaving it as is then, there is no need to add address 
in the table.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ