Re: [U-Boot] [PATCH 1/2] dm: spi: Return 0 if driver does not implement ops->cs_info

2019-09-06 Thread Jagan Teki
On Thu, Aug 29, 2019 at 7:40 PM Bin Meng  wrote:
>
> If an SPI controller driver does not implement ops->cs_info, that
> probably means any chip select number could be valid, hence let's
> return 0 for spi_cs_info().
>
> Signed-off-by: Bin Meng 
> ---

Reviewed-by: Jagan Teki 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] dm: spi: Return 0 if driver does not implement ops->cs_info

2019-09-02 Thread Bin Meng
On Thu, Aug 29, 2019 at 10:10 PM Bin Meng  wrote:
>
> If an SPI controller driver does not implement ops->cs_info, that
> probably means any chip select number could be valid, hence let's
> return 0 for spi_cs_info().
>
> Signed-off-by: Bin Meng 
> ---
>
>  drivers/spi/spi-uclass.c | 7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
>

Ping?
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [PATCH 1/2] dm: spi: Return 0 if driver does not implement ops->cs_info

2019-08-29 Thread Bin Meng
If an SPI controller driver does not implement ops->cs_info, that
probably means any chip select number could be valid, hence let's
return 0 for spi_cs_info().

Signed-off-by: Bin Meng 
---

 drivers/spi/spi-uclass.c | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 88cb2a1..24de0b5 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -237,11 +237,10 @@ int spi_cs_info(struct udevice *bus, uint cs, struct 
spi_cs_info *info)
return ops->cs_info(bus, cs, info);
 
/*
-* We could assume there is at least one valid chip select, but best
-* to be sure and return an error in this case. The driver didn't
-* care enough to tell us.
+* We could assume there is at least one valid chip select.
+* The driver didn't care enough to tell us.
 */
-   return -ENODEV;
+   return 0;
 }
 
 int spi_find_bus_and_cs(int busnum, int cs, struct udevice **busp,
-- 
2.7.4

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot