From: zhangfei.gao@linaro.org (zhangfei)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] i2c: designware: add two optional property tx/rx-fifo-size
Date: Wed, 19 Jun 2013 08:37:14 +0800 [thread overview]
Message-ID: <51C0FD3A.2060309@linaro.org> (raw)
In-Reply-To: <20130618162257.GF7718@katana>
On 13-06-19 12:22 AM, Wolfram Sang wrote:
> On Tue, Jun 11, 2013 at 10:37:10AM +0800, Zhangfei Gao wrote:
>> rx-fifo-size and tx-fifo-size will be updated if provided from dts
>>
>> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
>> CC: Baruch Siach <baruch@tkos.co.il>
>> ---
>> .../devicetree/bindings/i2c/i2c-designware.txt | 7 +++++++
>> drivers/i2c/busses/i2c-designware-platdrv.c | 3 +++
>> 2 files changed, 10 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>> index e42a2ee..84717fe 100644
>> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>> @@ -6,6 +6,11 @@ Required properties :
>> - reg : Offset and length of the register set for the device
>> - interrupts : <IRQ> where IRQ is the interrupt number.
>>
>> +Optional properties:
>> +
>> + - rx-fifo-size : 1 cell, Rx fifo size
>> + - tx-fifo-size : 1 cell, Tx fifo size
>> +
>
> I'd think the bindings are okay, yet I wonder they are not more used in
> practice. So, an ack from a dt-expert would be appreciated.
Thanks Wolfram,
The patches also acked by Baruch, the original writer.
Some platform can not provide fifo info from register
DW_IC_COMP_PARAM_1, hisilicon read such register is 0.
>> + of_property_read_u32(np, "rx-fifo-size", &dev->rx_fifo_depth);
>> + of_property_read_u32(np, "tx-fifo-size", &dev->tx_fifo_depth);
>
> Those can fail.
"rx-fifo-size and tx-fifo-size will be updated if provided from dts"
The thought is if dts have the optional properties, then update.
otherwise just use original value, read from register.
So I thought the read fail is fine?
WARNING: multiple messages have this Message-ID (diff)
From: zhangfei <zhangfei.gao@linaro.org>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Dirk Brandewie <dirk.brandewie@gmail.com>,
baruch@tkos.co.il, devicetree-discuss@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 2/2] i2c: designware: add two optional property tx/rx-fifo-size
Date: Wed, 19 Jun 2013 08:37:14 +0800 [thread overview]
Message-ID: <51C0FD3A.2060309@linaro.org> (raw)
In-Reply-To: <20130618162257.GF7718@katana>
On 13-06-19 12:22 AM, Wolfram Sang wrote:
> On Tue, Jun 11, 2013 at 10:37:10AM +0800, Zhangfei Gao wrote:
>> rx-fifo-size and tx-fifo-size will be updated if provided from dts
>>
>> Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
>> CC: Baruch Siach <baruch@tkos.co.il>
>> ---
>> .../devicetree/bindings/i2c/i2c-designware.txt | 7 +++++++
>> drivers/i2c/busses/i2c-designware-platdrv.c | 3 +++
>> 2 files changed, 10 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-designware.txt b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>> index e42a2ee..84717fe 100644
>> --- a/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-designware.txt
>> @@ -6,6 +6,11 @@ Required properties :
>> - reg : Offset and length of the register set for the device
>> - interrupts : <IRQ> where IRQ is the interrupt number.
>>
>> +Optional properties:
>> +
>> + - rx-fifo-size : 1 cell, Rx fifo size
>> + - tx-fifo-size : 1 cell, Tx fifo size
>> +
>
> I'd think the bindings are okay, yet I wonder they are not more used in
> practice. So, an ack from a dt-expert would be appreciated.
Thanks Wolfram,
The patches also acked by Baruch, the original writer.
Some platform can not provide fifo info from register
DW_IC_COMP_PARAM_1, hisilicon read such register is 0.
>> + of_property_read_u32(np, "rx-fifo-size", &dev->rx_fifo_depth);
>> + of_property_read_u32(np, "tx-fifo-size", &dev->tx_fifo_depth);
>
> Those can fail.
"rx-fifo-size and tx-fifo-size will be updated if provided from dts"
The thought is if dts have the optional properties, then update.
otherwise just use original value, read from register.
So I thought the read fail is fine?
next prev parent reply other threads:[~2013-06-19 0:37 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 2:37 [PATCH v3 0/2] support hisilicon i2c Zhangfei Gao
2013-06-11 2:37 ` Zhangfei Gao
2013-06-11 2:37 ` [PATCH v3 1/2] i2c: designware: use module_platform_driver Zhangfei Gao
2013-06-11 2:37 ` Zhangfei Gao
2013-06-18 16:27 ` Wolfram Sang
2013-06-18 16:27 ` Wolfram Sang
2013-06-19 1:00 ` zhangfei
2013-06-19 1:00 ` zhangfei
2013-06-11 2:37 ` [PATCH v3 2/2] i2c: designware: add two optional property tx/rx-fifo-size Zhangfei Gao
2013-06-11 2:37 ` Zhangfei Gao
2013-06-14 3:37 ` Baruch Siach
2013-06-14 3:37 ` Baruch Siach
2013-06-18 16:22 ` Wolfram Sang
2013-06-18 16:22 ` Wolfram Sang
2013-06-19 0:37 ` zhangfei [this message]
2013-06-19 0:37 ` zhangfei
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=51C0FD3A.2060309@linaro.org \
--to=zhangfei.gao@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.