odroid: remove CONFIG_DM_I2C_COMPAT config
[platform/kernel/u-boot.git] / tools / dtoc / fdt_fallback.py
index 1c8c9c7..23e2679 100644 (file)
@@ -58,7 +58,7 @@ class Node(NodeBase):
         This fills in the props and subnodes properties, recursively
         searching into subnodes so that the entire tree is built.
         """
-        for name, byte_list_str in self._fdt.GetProps(self.path).iteritems():
+        for name, byte_list_str in self._fdt.GetProps(self.path).items():
             prop = Prop(self, name, byte_list_str)
             self.props[name] = prop
 
@@ -70,6 +70,19 @@ class Node(NodeBase):
 
             node.Scan()
 
+    def DeleteProp(self, prop_name):
+        """Delete a property of a node
+
+        The property is deleted using fdtput.
+
+        Args:
+            prop_name: Name of the property to delete
+        Raises:
+            CommandError if the property does not exist
+        """
+        args = [self._fdt._fname, '-d', self.path, prop_name]
+        command.Output('fdtput', *args)
+        del self.props[prop_name]
 
 class FdtFallback(Fdt):
     """Provides simple access to a flat device tree blob using fdtget/fdtput
@@ -147,7 +160,7 @@ class FdtFallback(Fdt):
         if default is not None:
           args += ['-d', str(default)]
         if typespec is not None:
-          args += ['-t%s' % typespec]
+          args += ['-t', typespec]
         out = command.Output('fdtget', *args)
         return out.strip()