From 61708bb0a24caad99b0e79de52077dafb59688d6 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Wed, 30 Mar 2022 09:33:13 +0200 Subject: spi: spi-uclass: Add new spi_get_bus_and_cs() implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move legacy spi_get_bus_and_cs() code to _spi_get_bus_and_cs(). Add new spi_get_bus_and_cs() implementation which rely on DT for speed and mode and don't need any drv_name nor dev_name parameters. This will prepare the ground for next patch. Update all callers to use _spi_get_bus_and_cs() to keep the same behavior. Signed-off-by: Patrice Chotard Cc: Marek Behun Cc: Jagan Teki Cc: Vignesh R Cc: Joe Hershberger Cc: Ramon Fried Cc: Lukasz Majewski Cc: Marek Vasut Cc: Wolfgang Denk Cc: Simon Glass Cc: Stefan Roese Cc: "Pali Rohár" Cc: Konstantin Porotchkin Cc: Igal Liberman Cc: Bin Meng Cc: Pratyush Yadav Cc: Sean Anderson Cc: Anji J Cc: Biwen Li Cc: Priyanka Jain Cc: Chaitanya Sakinam --- cmd/spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cmd') diff --git a/cmd/spi.c b/cmd/spi.c index 6dc32678da1..454ebe37d75 100644 --- a/cmd/spi.c +++ b/cmd/spi.c @@ -46,8 +46,8 @@ static int do_spi_xfer(int bus, int cs) str = strdup(name); if (!str) return -ENOMEM; - ret = spi_get_bus_and_cs(bus, cs, freq, mode, "spi_generic_drv", - str, &dev, &slave); + ret = _spi_get_bus_and_cs(bus, cs, freq, mode, "spi_generic_drv", + str, &dev, &slave); if (ret) return ret; #else -- cgit v1.2.3