[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <653bc533-8dca-cd9c-3ca0-d5628da37f4a@quicinc.com>
Date: Fri, 11 Feb 2022 16:05:07 +0530
From: "Satya Priya Kakitapalli (Temp)" <quic_c_skakit@...cinc.com>
To: Bjorn Andersson <bjorn.andersson@...aro.org>
CC: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
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
On 2/11/2022 6:27 AM, Bjorn Andersson wrote:
> On Tue 08 Feb 08:52 CST 2022, Satya Priya wrote:
>> diff --git a/drivers/regulator/qcom-pm8008-regulator.c b/drivers/regulator/qcom-pm8008-regulator.c
> [..]
>> +static int pm8008_regulator_probe(struct platform_device *pdev)
>> +{
>> + struct device *dev = &pdev->dev;
>> + int id = pdev->id % PM8008_NUM_LDOS;
> Why does this driver look completely different from all the other
> Qualcomm regulator drivers that we already have, and why do you register
> one platform_device per regulator?
Based on Mark's suggestions and the discussion happened here [1], I've
changed the design like this.
[1]
https://patchwork.kernel.org/project/linux-arm-msm/patch/1637314953-4215-3-git-send-email-quic_c_skakit@quicinc.com/
> The fundamental difference in design makes it hard to maintain and
> you're wasting quite a bit of memory with the unnecessary
> platfrom_device objects.
I'm going to change this. I will add only one cell with .name to match
with the regulator driver and probe all the regulators using a single
loop. That way we don't waste lot of memory by registering multiple
regulator platform devices.
> Regards,
> Bjorn
Powered by blists - more mailing lists