diff options
Diffstat (limited to 'kvmd/usb.py')
-rw-r--r-- | kvmd/usb.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/kvmd/usb.py b/kvmd/usb.py index 1f60ba75..4242b1cb 100644 --- a/kvmd/usb.py +++ b/kvmd/usb.py @@ -22,8 +22,6 @@ import os -from .logging import get_logger - from . import env @@ -38,20 +36,3 @@ def find_udc(udc: str) -> str: elif udc not in candidates: raise RuntimeError(f"Can't find selected UDC: {udc}") return udc # fe980000.usb - - -class UsbDeviceController: - def __init__(self, udc: str) -> None: - self.__udc = udc - self.__state_path = "" - - def find(self) -> None: - udc = find_udc(self.__udc) - self.__state_path = os.path.join(f"{env.SYSFS_PREFIX}/sys/class/udc", udc, "state") - get_logger().info("Using UDC %s", udc) - - def can_operate(self) -> bool: - assert self.__state_path - with open(self.__state_path, "r") as state_file: - # https://www.maxlinear.com/Files/Documents/an213_033111.pdf - return (state_file.read().strip().lower() == "configured") |