diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-10 12:07:14 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:53 -0800 |
commit | 4efea95324b66477f877d65c2d9c6ce188850174 (patch) | |
tree | 5bd27de40dab19895445e8be0ed52cc601b237c4 /mpm/python/usrp_mpm/periph_manager/udev.py | |
parent | 2270a6b1a670bfa8387004bafdfcf2e74fc90477 (diff) | |
download | uhd-4efea95324b66477f877d65c2d9c6ce188850174.tar.gz uhd-4efea95324b66477f877d65c2d9c6ce188850174.tar.bz2 uhd-4efea95324b66477f877d65c2d9c6ce188850174.zip |
mpm: Enabled mboard EEPROM readout
Diffstat (limited to 'mpm/python/usrp_mpm/periph_manager/udev.py')
-rw-r--r-- | mpm/python/usrp_mpm/periph_manager/udev.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/udev.py b/mpm/python/usrp_mpm/periph_manager/udev.py index 9d64b1b64..c0b85b032 100644 --- a/mpm/python/usrp_mpm/periph_manager/udev.py +++ b/mpm/python/usrp_mpm/periph_manager/udev.py @@ -19,18 +19,15 @@ import pyudev import os from ..mpmlog import get_logger -def get_eeprom_path(address): +def get_eeprom_paths(address): """ - Return EEPROM device path for a given I2C address + Return EEPROM device paths for a given I2C address """ context = pyudev.Context() parent = pyudev.Device.from_name(context, "platform", address) paths = [device.device_node if device.device_node is not None else device.sys_path for device in context.list_devices(parent=parent, subsystem="nvmem")] - if len(paths) != 1: - raise Exception("{0} paths to EEPROM found!".format(len(paths))) - return paths[0] + "/nvmem" - + return [os.path.join(x.encode('ascii'), 'nvmem') for x in paths] def get_spidev_nodes(spi_master): """ |