From: wenpan <wenpan@hisilicon.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: wsa@the-dreams.de, robh+dt@kernel.org, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
howell.yang@hisilicon.com, xuejiancheng@hisilicon.com
Subject: Re: [PATCH] i2c: hibvt: add Hisilicon BVT I2C controller driver
Date: Sat, 25 Jun 2016 15:53:05 +0800 [thread overview]
Message-ID: <c28b42aa-f9dd-a13b-59d7-71b97f81cea1@hisilicon.com> (raw)
In-Reply-To: <20160622102509.GD25837@leverpostej>
Hi Mark,
On 2016/6/22 18:25, Mark Rutland wrote:
> On Wed, Jun 22, 2016 at 04:55:26PM +0800, Pan Wen wrote:
>> add Hisilicon BVT I2C controller driver support.
>>
>> Signed-off-by: Pan Wen <wenpan@hisilicon.com>
>> ---
>> .../devicetree/bindings/i2c/i2c-hibvt.txt | 24 +
>> drivers/i2c/busses/Kconfig | 10 +
>> drivers/i2c/busses/Makefile | 1 +
>> drivers/i2c/busses/i2c-hibvt.c | 736 +++++++++++++++++++++
>> 4 files changed, 771 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hibvt.txt
>> create mode 100644 drivers/i2c/busses/i2c-hibvt.c
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-hibvt.txt b/Documentation/devicetree/bindings/i2c/i2c-hibvt.txt
>> new file mode 100644
>> index 0000000..3aa2cee
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-hibvt.txt
>> @@ -0,0 +1,24 @@
>> +Hisilicon BVT I2C master controller
>> +
>> +Required properties:
>> +- compatible: should be "hisilicon,hibvt-i2c".
>> +- reg: physical base address of the controller and length of memory mapped.
>> + region.
>> +- interrupts: interrupt number to the cpu.
>> +- clocks: phandles to input clocks.
>> +
>> +Optional properties:
>> +- clock-frequency: Desired I2C bus frequency in Hz, otherwise defaults to 100000.
>> +
>> +Other properties:
>> +see Documentation/devicetree/bindings/i2c/i2c.txt.
>> +
>> +Examples:
>> +i2c_bus0: i2c@12110000 {
>> + compatible = "hisilicon,hibvt-i2c";
>> + reg = <0x12110000 0x100>;
>> + interrupts = <20>;
>> + clocks = <&crg_ctrl HI3516CV300_APB_CLK>;
>> + clock-names = "apb_pclk";
>> + clock-frequency = <100000>;
>> +};
>
> The clock-names property was not described above, and the driver doesn't
> appear to use it.
>
> Please explciitly describe the clock-names you expect, and use them in
> the driver. If there is a single clock, then you can simply drop the
> clock-names property from the example.
>
> Thanks,
> Mark.
>
OK. Thanks for your comments. I will drop the clock-names property from the example in next version.
Thanks,
Pan.
>> + i2c->clk = devm_clk_get(&pdev->dev, NULL);
>> + if (IS_ERR(i2c->clk)) {
>> + dev_err(i2c->dev, "cannot get clock\n");
>> + return -ENOENT;
>> + }
>> + clk_prepare_enable(i2c->clk);
>
> .
>
next prev parent reply other threads:[~2016-06-25 7:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 8:55 [PATCH] i2c: hibvt: add Hisilicon BVT I2C controller driver Pan Wen
2016-06-22 10:25 ` Mark Rutland
2016-06-25 7:53 ` wenpan [this message]
2016-06-22 15:44 ` kbuild test robot
2016-06-24 15:47 ` Rob Herring
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=c28b42aa-f9dd-a13b-59d7-71b97f81cea1@hisilicon.com \
--to=wenpan@hisilicon.com \
--cc=devicetree@vger.kernel.org \
--cc=howell.yang@hisilicon.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=wsa@the-dreams.de \
--cc=xuejiancheng@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;
as well as URLs for NNTP newsgroup(s).