lkml.org 
[lkml]   [2018]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/2] spi: Add MXIC controller driver
On Mon, Oct 08, 2018 at 10:38:12AM +0200, Boris Brezillon wrote:

> This is wrong, ->cur_speed_hz should be updated in
> mxic_prepare_transfer_hardware() or mxic_spi_clk_check(), not when
> ->setup() is called. Also, you seem to ignore the xfer->speed_hz value,
> which might be different from spi->max_speed_hz. Maybe the
> ->prepare_transfer() hook is not the right place to do this
> ->cur_speed_hz selection in the end.

xfer->speed_hz should always be filled in so it's the only one you need
to pay attention to (as the code Boris proposed does).
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2018-10-08 15:38    [W:0.051 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site