[Probably you missed reply-all by mistake, so adding them again]

On 08/10/2011 01:34 AM, Linus Walleij wrote:
> On Tue, Aug 9, 2011 at 1:05 PM, Viresh Kumar <viresh.ku...@st.com> wrote:
> 
>> There were few issues with calculate_effective_freq() routine:
>> - It was returning first rate found >= requested rate. Now, if system have 
>> spi's
>>  rate as 83 MHz, with possible prescaled rates as 83, 41.5, 20.75, 13.83 (as 
>> we
>>  can prescale with multiples of 2). If user has given rate to be programmed 
>> as
>>  22 MHz, then driver programmes it to 41.5 MHz. This looks to be incorrect, 
>> as
>>  user might have given the upper limit of the device, and we are programming 
>> it
>>  above it.
>> - Driver finds the first satisfying rate and programmes it, but with other
>>  values of scr & cpsdvsr, it is possible to get more closer rate.
> 
> Good that you found this bug!
> 
>> +#define SPI_RATE(rate, cpsdvsr, scr)   (rate / (cpsdvsr * (1 + scr)))
> 
> Can you use a static inline instead of a macro? It is often preferred.
> If you do, this is Acked-by.
> 

Not a problem. Will surely do that.

-- 
viresh

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to