py-dtbindings  1.4.1
This python "lib" aim is to extract devicetree bindings informations.
bindings.SDTBindings Class Reference

The main class that you should call. More...

Public Member Functions

def get_binding (self, compatible)
 Init the Binding class corresponding to compatible param. More...
 

Private Member Functions

def _compat_extractor (self, key, compat)
 Extract compatible node from properties and init a dict like #_files_dict to access path through compatible. More...
 
def _duplicate_checker (self, item, key)
 Used by _compat_extractor() in order to check if compatible have duplicate.
 

Private Attributes

 _path
 Internal reference to rootdir of bindings.
 
 _verbose
 Internal reference for printing debug level (0 to 3)
 
 _files_dict
 
 _compat_dict
 @varDuplicated _files_dict More...
 

Detailed Description

The main class that you should call.

# This exemple will print required for i2c-mux-pinctrl
from bindings import SDTBindings
if __name__ == "__main__":
myPath = "./devicetree/bindings"
mySDT = SDTBindings(myPath,0)
# Retrieve a Binding() by its name
myBinding = mySDT.get_binding("i2c-mux-pinctrl")
print(myBinding.required())

Member Function Documentation

◆ _compat_extractor()

def bindings.SDTBindings._compat_extractor (   self,
  key,
  compat 
)
private

Extract compatible node from properties and init a dict like #_files_dict to access path through compatible.

Todo:
Process compatible with "pattern"
Process "snps,dwmac"

◆ get_binding()

def bindings.SDTBindings.get_binding (   self,
  compatible 
)

Init the Binding class corresponding to compatible param.

Parameters
compatibleThe compatible you want the binding for

Member Data Documentation

◆ _compat_dict

bindings.SDTBindings._compat_dict
private

@varDuplicated _files_dict

Internal dict where key are filename without extension (e.g. serial)
value are complet path to these file

Internal reference similar to #_files_dict but keys are 'compatible'


The documentation for this class was generated from the following file: