On Sun, Nov 08, 2015 at 11:13:33AM +0100, Marcus Weseloh wrote:
> 2015-11-08 10:35 GMT+01:00 Mark Brown <[email protected]>:

> > This is not needed, the core will always ensure that the transfer speed
> > is set per on each transfer.

> Ah, so we could always use tfr->speed_hz and completely ignore the
> spi->max_speed_hz for the clock calculations, correct?

Yes.

> I did notice however, that the SPI system doesn't validate the
> speed_hz value. So if I leave out the above quoted sanity checking,
> then tfr->speed_hz could also contain values like -400, which trips up
> the spi system in such a way that I could only repair with a reboot. I
> was testing this with spidev... so maybe spidev should be patched to
> check the speed value for validity?

No, why would it make sense to have this validation in spidev - it's
just one SPI device.  It's better to add the validation to the SPI core.

Attachment: signature.asc
Description: PGP signature

Reply via email to