linux/arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi
"""
+from typing import Optional
import os
import re
import gpiod
uartPorts = ((1, UART1_TX, UART1_RX),)
-def get_dts_alias(device: str) -> str:
+def get_dts_alias(device: str) -> Optional[str]:
"""Get the Device Tree Alias"""
uevent_path = "/sys/bus/platform/devices/" + device + "/uevent"
if os.path.exists(uevent_path):
match = re.search(pattern, line)
if match:
return match.group(1).upper()
-
- return None
+ return None
# ordered as i2cId, sclId, sdaId