aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/python
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2017-08-09 13:04:53 -0700
committerMartin Braun <martin.braun@ettus.com>2017-12-22 15:04:00 -0800
commit8ecb09be8bafa06245f0e5af758d165d94aa140e (patch)
tree48689e92200d126ff710f651b71f3894f9277e9c /mpm/python
parentd711ad4c93e0396590cfcd992a55b9d49ac9b326 (diff)
downloaduhd-8ecb09be8bafa06245f0e5af758d165d94aa140e.tar.gz
uhd-8ecb09be8bafa06245f0e5af758d165d94aa140e.tar.bz2
uhd-8ecb09be8bafa06245f0e5af758d165d94aa140e.zip
mpm: Overlay handling functions use dtoverlay module
Diffstat (limited to 'mpm/python')
-rw-r--r--mpm/python/usrp_mpm/periph_manager/base.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/mpm/python/usrp_mpm/periph_manager/base.py b/mpm/python/usrp_mpm/periph_manager/base.py
index 96770139d..3ab822a30 100644
--- a/mpm/python/usrp_mpm/periph_manager/base.py
+++ b/mpm/python/usrp_mpm/periph_manager/base.py
@@ -56,7 +56,6 @@ class PeriphManagerBase(object):
"""
# stores discovered device information in dicts
mboard_if_addrs = {}
- mboard_overlays = {}
# this information has to be provided by
# the specific periph_manager implementation
updateable_components = []
@@ -345,21 +344,20 @@ class PeriphManagerBase(object):
"""
return self.updateable_components
- def get_overlays(self):
+ @no_claim
+ def list_available_overlays(self):
"""
- get and store the list of available dt overlays
+ Returns a list of available device tree overlays
"""
- self.mboard_overlays = []
- for fw_files in os.listdir("/lib/firmware/"):
- if fw_files.endswith(".dtbo"):
- self.mboard_overlays.append(fw_files.strip(".dtbo"))
+ return dtoverlay.list_available_overlays()
- def check_overlay(self):
+ @no_claim
+ def list_active_overlays(self):
"""
+ Returns a list of currently loaded device tree overlays
check which dt overlay is loaded currently
"""
- for overlay_file in os.listdir("/sys/kernel/device-tree/overlays/"):
- self.overlays = overlay_file
+ return dtoverlay.list_overlays()
def _get_device_info(self):
"""