py-dtbindings
1.4.1
This python "lib" aim is to extract devicetree bindings informations.
|
This python "lib" aim is to extract devicetree bindings informations.
This is the root class, this is the one that should be called. Give it the path of your local copy of bindings and it will load it.
As there is an internal list of compatible pointing on file its related to, you should call get_binding method to retrieve a Binding from a given compatible
(e.g. myBinding = mySDTBindings.get_binding("gpio-keys") will return a Binding object created from gpio-keys.yaml binding)
This class represents a binding :)
Public Member Functions:
Will return a Prop item by calling : BindingProps.prop_from_name(name) functions
Will return required properties list (str)
Will return optional properties list (str)
Public Attributes:
This class represents the properties of a binding. It stands to be initialized by a Binding class and access through it. This class var will also contain binding properties of included bindings (e.g. using "allOf/$ref")
All member functions should be called by a Binding class for initializing
sudo apt install swig python3 python3-ruamel.yaml pip3 install -r ./requirement.txt
Then juste add bindings.py to your project and let's go ¯\_(ツ)_/¯
!
wget-ed from https://www.kernel.org/doc/Documentation/devicetree/bindings/
Feel free to improve this as you want and share it ! Also, I'm listening to any comments !