From e942181f600b6b35f2200244b9899e23b20cf6cf Mon Sep 17 00:00:00 2001 From: Mark Meserve Date: Tue, 8 May 2018 17:54:26 -0500 Subject: mpm: allow multiple spi device objects to use the same chip select --- mpm/python/usrp_mpm/dboard_manager/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpm/python/usrp_mpm/dboard_manager/base.py b/mpm/python/usrp_mpm/dboard_manager/base.py index 36f446360..901e8cbf2 100644 --- a/mpm/python/usrp_mpm/dboard_manager/base.py +++ b/mpm/python/usrp_mpm/dboard_manager/base.py @@ -61,9 +61,9 @@ class DboardManagerBase(object): keys from chip_select_map to spidev nodes, and do a sanity check that enough nodes are available. """ - if len(spi_devices) < len(chip_select_map): + if len(spi_devices) < len(set(chip_select_map.values())): self.log.error("Expected {0} spi devices, found {1}".format( - len(chip_select_map), len(spi_devices), + len(set(chip_select_map.values())), len(spi_devices), )) self.log.error("Not enough SPI devices found.") return {} -- cgit v1.2.3