GPIO refactored (#495)
* **Refactor** * GPIO subsystem moved to a descriptor-based model for per-pin ownership and runtime pin management; many platform drivers now acquire/release descriptors. * Device trees and drivers now use GPIO phandle-style pin specifications across all boards and all drivers. * **Behavior** * Device list now encodes per-device status (ok/disabled); boot will skip disabled devices accordingly. * **Deprecation** * Legacy GPIO HAL marked deprecated and replaced with descriptor-based interfaces. * **Chores** * Bindings and platform configs updated to the new GPIO pin-spec format.
This commit is contained in:
committed by
GitHub
parent
dff93cb655
commit
26c17986c6
@@ -29,6 +29,7 @@ class DtsTransformer(Transformer):
|
||||
def device(self, tokens: list):
|
||||
node_name = None
|
||||
node_alias = None
|
||||
status = None
|
||||
properties = list()
|
||||
child_devices = list()
|
||||
for index, item in enumerate(tokens):
|
||||
@@ -37,10 +38,13 @@ class DtsTransformer(Transformer):
|
||||
elif type(item) is Token and item.type == 'NODE_ALIAS':
|
||||
node_alias = item.value
|
||||
elif type(item) is DeviceProperty:
|
||||
properties.append(item)
|
||||
if item.name == "status":
|
||||
status = item.value
|
||||
else:
|
||||
properties.append(item)
|
||||
elif type(item) is Device:
|
||||
child_devices.append(item)
|
||||
return Device(node_name, node_alias, properties, child_devices)
|
||||
return Device(node_name, node_alias, status, properties, child_devices)
|
||||
def device_property(self, objects: List[object]):
|
||||
name = objects[0]
|
||||
# Boolean property has no value as the value is implied to be true
|
||||
|
||||
Reference in New Issue
Block a user