[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <543F8CD2.1010302@rock-chips.com>
Date: Thu, 16 Oct 2014 17:16:02 +0800
From: addy ke <addy.ke@...k-chips.com>
To: broonie@...nel.org
CC: heiko@...ech.de, dianders@...omium.org, grant.likely@...aro.org,
robh+dt@...nel.org, amstan@...gle.com, sonnyrao@...gle.com,
linux-kernel@...r.kernel.org, linux-spi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, devicetree@...r.kernel.org,
olof@...om.net, hj@...k-chips.com, kever.yang@...k-chips.com,
xjq@...k-chips.com, huangtao@...k-chips.com, zyw@...k-chips.com,
yzq@...k-chips.com, zhenfu.fang@...k-chips.com, cf@...k-chips.com,
zhangqing@...k-chips.com, hl@...k-chips.com, wei.luo@...k-chips.com
Subject: Re: [PATCH 1/2] spi/rockchip: fix bug that case spi can't go as fast
as slave request
hi, Mark
On 2014/10/15 21:04, Mark Brown wrote:
> On Wed, Oct 15, 2014 at 07:25:49PM +0800, Addy Ke wrote:
>
>> + if (WARN_ON(rs->speed > MAX_SCLK_OUT))
>> + rs->speed = MAX_SCLK_OUT;
>> +
>> + /* the minimum divsor is 2 */
>> + if (rs->max_freq < 2 * rs->speed) {
>> + clk_set_rate(rs->spiclk, 2 * rs->speed);
>> + rs->max_freq = clk_get_rate(rs->spiclk);
>> + }
>
> I'll apply this but you should be checking the return code from
> clk_set_rate() here, please send a followup patch doing that. It might
If clk_set_rate return error, do I only put dev_warn here or return error value to spi core?
> also be worth consdering just setting the rate unconditionally here, it
> seems like it should make things simpler.
>
I think we need.
If we set the rate unconditionally here, clk_set_rate() will be executed in each spi transfer.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists