spi: Implement spi_set_speed
authorPaul Barker <paul.barker@sancloud.com>
Wed, 5 Oct 2022 12:18:34 +0000 (13:18 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 16 Oct 2022 10:23:22 +0000 (12:23 +0200)
commitc98f6fed93ca49a956d628200b2dfa1454ce6fbb
treeda69733fed050f319e35332aa052cfee314b1efc
parent0e49f5c26caf9972137a474065afd4bdfe5ec062
spi: Implement spi_set_speed

This function is already defined in spi.h but no implementation of it
currently exists in the tree. The implementation is based on the static
function spi_set_speed_mode(). The function prototype is modified so
that an success or error condition can be returned to the caller.

Signed-off-by: Paul Barker <paul.barker@sancloud.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
drivers/spi/spi-uclass.c
include/spi.h