From: paul.liu@linaro•org (Ying-Chun Liu (PaulLiu))
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v4 1/2] mfd: Add anatop mfd driver
Date: Thu, 01 Mar 2012 17:19:47 +0800 [thread overview]
Message-ID: <4F4F3F33.4000608@linaro.org> (raw)
In-Reply-To: <20120221111705.GV5387@sortiz-mobl>
(2012?02?21? 19:17), Samuel Ortiz wrote:
> Hi Paul,
>
> I didn't get patch #2, so I don't get to see how the read/write functions ar
> eused for example.
>
Hi Samuel,
Sorry for late reply.
I've sent out v5 today.
>> + ioreg = ioremap(ofaddr, ofsize);
>> + if (!ioreg)
>> + return -EINVAL;
>> + drvdata = devm_kzalloc(dev, sizeof(struct anatop), GFP_KERNEL);
>> + if (!drvdata)
>> + return -EINVAL;
>> + drvdata->ioreg = ioreg;
>> + drvdata->read = anatop_read;
>> + drvdata->write = anatop_write;
>> + platform_set_drvdata(pdev, drvdata);
>> + of_platform_bus_probe(np, of_anatop_regulator_match, dev);
>> + return ret;
>> +}
> So it seems that your driver here does nothing but extending your device tree
> definition. Correct me if I'm wrong, aren't you trying to fix a broken device
> tree definition here ?
>
The driver here ioremap the addresses for anatop chip in i.MX6Q SoC. The
addresses are shared by several regulators. Also thermal drivers are
also in the same range.
Here are examples of the anatop description in dts file
anatop at 020c8000 {
compatible = "fsl,imx6q-anatop";
reg = <0x020c8000 0x1000>;
interrupts = <0 49 0x04 0 54 0x04 0 127 0x04>;
#address-cells = <1>;
#size-cells = <1>;
reg_vddpu: regulator-vddpu at 140 {
compatible = "fsl,anatop-regulator";
regulator-name = "vddpu";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1300000>;
regulator-always-on;
reg = <0x140 1>;
vol-bit-shift = <9>;
vol-bit-size = <5>;
min-bit-val = <1>;
min-voltage = <725000>;
max-voltage = <1300000>;
};
reg_vddcore: regulator-vddcore at 140 {
compatible = "fsl,anatop-regulator";
regulator-name = "vddcore";
regulator-min-microvolt = <725000>;
regulator-max-microvolt = <1300000>;
regulator-always-on;
reg = <0x140 1>;
vol-bit-shift = <0>;
vol-bit-size = <5>;
min-bit-val = <1>;
min-voltage = <725000>;
max-voltage = <1300000>;
};
...
So both reg_vddpu and reg_vddcore are using the same address.
Yours Sincerely,
Paul
next prev parent reply other threads:[~2012-03-01 9:19 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1324980994-18462-1-git-send-email-paul.liu@linaro.org>
2012-02-08 20:51 ` [PATCH v4 1/2] mfd: Add anatop mfd driver Ying-Chun Liu (PaulLiu)
2012-02-08 20:51 ` [PATCH v4 2/2] Regulator: Add Anatop regulator driver Ying-Chun Liu (PaulLiu)
2012-02-09 11:24 ` Mark Brown
2012-02-11 6:36 ` Shawn Guo
2012-02-11 13:17 ` Mark Brown
2012-02-11 6:05 ` [PATCH v4 1/2] mfd: Add anatop mfd driver Shawn Guo
2012-02-21 11:17 ` Samuel Ortiz
2012-03-01 9:19 ` Ying-Chun Liu (PaulLiu) [this message]
2012-03-01 9:10 ` [PATCH v5 " Ying-Chun Liu (PaulLiu)
2012-03-01 9:10 ` [PATCH v5 2/2] Regulator: Add Anatop regulator driver Ying-Chun Liu (PaulLiu)
2012-03-01 11:17 ` Mark Brown
2012-03-01 11:30 ` [PATCH v5 1/2] mfd: Add anatop mfd driver Mark Brown
2012-03-02 7:00 ` [PATCH v6 " Ying-Chun Liu (PaulLiu)
2012-03-02 7:00 ` [PATCH v6 2/2] Regulator: Add Anatop regulator driver Ying-Chun Liu (PaulLiu)
2012-03-04 6:51 ` Shawn Guo
2012-03-04 13:29 ` Mark Brown
2012-03-02 7:07 ` [PATCH v6 1/2] mfd: Add anatop mfd driver Venu Byravarasu
2012-03-02 7:51 ` Ying-Chun Liu (PaulLiu)
2012-03-02 8:02 ` Venu Byravarasu
2012-03-02 14:00 ` Peter Korsgaard
2012-03-03 17:39 ` [PATCH v7 " Ying-Chun Liu (PaulLiu)
2012-03-03 17:58 ` Mark Brown
2012-03-04 5:25 ` Shawn Guo
2012-03-04 5:42 ` Shawn Guo
2012-03-04 5:55 ` Shawn Guo
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=4F4F3F33.4000608@linaro.org \
--to=paul.liu@linaro$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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