From: chenfeng <puck.chen@hisilicon.com>
To: Mark Brown <broonie@kernel.org>
Cc: <lee.jones@linaro.org>, <linux-kernel@vger.kernel.org>,
<lgirdwood@gmail.com>, <robh+dt@kernel.org>, <pawel.moll@arm.com>,
<mark.rutland@arm.com>, <ijc+devicetree@hellion.org.uk>,
<galak@codeaurora.org>, <xuwei5@hisilicon.com>,
<puck.chen@aliyun.com>, <yudongbin@hisilicon.com>,
<saberlily.xia@hisilicon.com>, <suzhuangluan@hisilicon.com>,
<kong.kongxinwei@hisilicon.com>, <xuyiping@hisilicon.com>,
<z.liuxinliang@hisilicon.com>, <weidong2@hisilicon.com>,
<w.f@huawei.com>, <qijiwen@hisilicon.com>,
<peter.panshilin@hisilicon.com>, <dan.zhao@hisilicon.com>,
<linuxarm@huawei.com>
Subject: Re: [PATCH v3 5/5] hisilicon/dts: Add hi655x pmic dts node
Date: Mon, 21 Dec 2015 14:20:16 +0800 [thread overview]
Message-ID: <56779A20.9070802@hisilicon.com> (raw)
In-Reply-To: <56776B91.3030004@hisilicon.com>
On 2015/12/21 11:01, chenfeng wrote:
> Mark,
>
> On 2015/12/19 1:58, Mark Brown wrote:
>> On Thu, Dec 17, 2015 at 11:27:27AM +0800, chenfeng wrote:
>>
>>> +- regulator-vset-regs: Voltage set register offset.
>>> +- regulator-vset-mask: voltage set control mask.
>>> +- regulator-n-vol: The num of support voltages.
>>> +- regulator-vset-table: The table of support voltages.
>>
>>>> Why is this in the binding? This is a binding for a specific device,
>>>> there is no point in putting all these data tables in the DT - it just
>>>> bloats the DT and makes it harder for us to enhance our support for this
>>>> device in the future.
>>
>>> You mentioned in previous version,I I have some questions for it.
>>
>>> This regulator-vset-regs etc are vendor specific describe. The hi655x PMIC
>>
>> There's nothing vendor specific about the way this is written...
>>
>>> is a series of chips. They all have this value, but the offset may be different.
>>> And we can generate the dts file from excel which is defined by SOC.
>>
>>> I think the dts is designed to distinguish different platform. If we hard code this
>>> in files, it may be also different to use as common in next chip version.
>>
>> If your tooling can generate DT files it can generate C code just as
>> well and it seems unlikely you're going to be able to build new boards
>> without being able to do firmware updates here. Especially for the
>> sorts of systems that use DT the set of scenarios where you're able to
>> update the DT but not the kernel seems like it will be extremely
>> limited. I don't really buy the argument that there's any practical
>> difference in the ability to update the kernel and DT and to the extent
>> there is one it seems better to keep the ABI we have to support smaller
>> by having the DT be minimal.
>>
>> This also allows us to map things more efficiently than we can with just
>> a table of voltages. For example a good selection of the regulators in
>> your example DT appear to be linear ranges and so should be mapped as
>> such so we can do direct calcuations rather than having to iterate
>> through a table to map voltages into selectors. That gets especially
>> serious for higher resolution regulators like most DCDCs (and modern
>> LDOs for that matter).
>>
> Thanks,
> I see, I will change the table of voltages into driver.
> like this,
> static const unsigned int voltages[] = {
> 1500000, 1800000, 2400000, 2500000,
> 2600000, 2700000, 2850000, 3000000,
> };
>
> And there will be two open-code function for is-enable and disable in the regulator driver.
> Since we need use the status and disable register on PM chip. Only enable reg in the regulator desc.
>
> Do you agree with this?
>
While doing this in driver code, I found that it seems all the vendor chip have
the voltage table. So I am wondering can we add this into the regulator framework.
We can add in the function of_get_regulation_constraints to get the vset table.
I am not sure this is right or not.
>
>
next prev parent reply other threads:[~2015-12-21 6:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-15 12:54 [PATCH v3 0/5] Add Support for Hi6220 PMIC Hi6553 MFD Core Chen Feng
2015-12-15 12:54 ` [PATCH v3 1/5] doc: bindings: Add document for mfd hi665x PMIC Chen Feng
2015-12-15 12:54 ` [PATCH v3 2/5] doc: bindings: Document for hi655x regulator driver Chen Feng
2015-12-15 12:54 ` [PATCH v3 3/5] mfd: hi655x: Add hi665x pmic driver Chen Feng
2015-12-15 13:29 ` kbuild test robot
2015-12-15 13:29 ` [PATCH] mfd: hi655x: fix platform_no_drv_owner.cocci warnings kbuild test robot
2015-12-15 12:54 ` [PATCH v3 4/5] regulator: add regulator driver of hi655x PMIC Chen Feng
2015-12-16 19:16 ` Mark Brown
2015-12-17 3:18 ` chenfeng
2015-12-15 12:54 ` [PATCH v3 5/5] hisilicon/dts: Add hi655x pmic dts node Chen Feng
2015-12-17 3:27 ` chenfeng
2015-12-18 17:58 ` Mark Brown
2015-12-21 3:01 ` chenfeng
2015-12-21 6:20 ` chenfeng [this message]
2015-12-23 0:46 ` Mark Brown
2015-12-24 2:43 ` chenfeng
2015-12-22 16:08 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56779A20.9070802@hisilicon.com \
--to=puck.chen@hisilicon.com \
--cc=broonie@kernel.org \
--cc=dan.zhao@hisilicon.com \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kong.kongxinwei@hisilicon.com \
--cc=lee.jones@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=peter.panshilin@hisilicon.com \
--cc=puck.chen@aliyun.com \
--cc=qijiwen@hisilicon.com \
--cc=robh+dt@kernel.org \
--cc=saberlily.xia@hisilicon.com \
--cc=suzhuangluan@hisilicon.com \
--cc=w.f@huawei.com \
--cc=weidong2@hisilicon.com \
--cc=xuwei5@hisilicon.com \
--cc=xuyiping@hisilicon.com \
--cc=yudongbin@hisilicon.com \
--cc=z.liuxinliang@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox