dts/extract: Remove bogus pinctrl generation

The pinctrl generation has never done anything useful so lets remove it
as its just dead code.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2019-06-06 15:36:26 -05:00 committed by Kumar Gala
commit 1c55882ae3
2 changed files with 3 additions and 75 deletions

View file

@ -1,66 +0,0 @@
#
# Copyright (c) 2018 Bobby Noelte
#
# SPDX-License-Identifier: Apache-2.0
#
from extract.globals import *
from extract.directive import DTDirective
##
# @brief Manage pinctrl-x directive.
#
class DTPinCtrl(DTDirective):
##
# @brief Extract pinctrl information.
#
# @param node_path Path to node owning the pinctrl definition.
# @param prop pinctrl-x key
# @param def_label Define label string of client node owning the pinctrl
# definition.
#
def extract(self, node_path, prop, def_label):
pinconf = reduced[node_path]['props'][prop]
prop_list = []
if not isinstance(pinconf, list):
prop_list.append(pinconf)
else:
prop_list = list(pinconf)
def_prefix = def_label.split('_')
prop_def = {}
for p in prop_list:
pin_node_path = phandles[p]
pin_subnode = '/'.join(pin_node_path.split('/')[-1:])
cell_yaml = get_binding(pin_node_path)
cell_prefix = 'PINMUX'
post_fix = []
if cell_prefix is not None:
post_fix.append(cell_prefix)
for subnode in reduced:
if pin_subnode in subnode and pin_node_path != subnode:
# found a subnode underneath the pinmux handle
pin_label = def_prefix + post_fix + subnode.split('/')[-2:]
for i, cells in enumerate(reduced[subnode]['props']):
key_label = list(pin_label) + \
[cell_yaml['#cells'][0]] + [str(i)]
func_label = key_label[:-2] + \
[cell_yaml['#cells'][1]] + [str(i)]
key_label = str_to_label('_'.join(key_label))
func_label = str_to_label('_'.join(func_label))
prop_def[key_label] = cells
prop_def[func_label] = \
reduced[subnode]['props'][cells]
insert_defs(node_path, prop_def, {})
##
# @brief Management information for pinctrl-[x].
pinctrl = DTPinCtrl()

View file

@ -23,7 +23,6 @@ from extract.compatible import compatible
from extract.interrupts import interrupts
from extract.reg import reg
from extract.flash import flash
from extract.pinctrl import pinctrl
from extract.default import default
@ -77,8 +76,6 @@ def generate_prop_defines(node_path, prop):
interrupts.extract(node_path, prop, names, def_label)
elif prop == 'compatible':
compatible.extract(node_path, prop, def_label)
elif 'pinctrl-' in prop:
pinctrl.extract(node_path, prop, def_label)
elif 'clocks' in prop:
clocks.extract(node_path, prop, def_label)
elif 'pwms' in prop or 'gpios' in prop:
@ -169,12 +166,9 @@ def prop_names(node, prop_name):
# interrupt-names, etc.) The list is copied so that it can be modified
# in-place later without stomping on the device tree data.
if prop_name.startswith('pinctrl-'):
names = node['props'].get('pinctrl-names', [])
else:
# The first case turns 'interrupts' into 'interrupt-names'
names = node['props'].get(prop_name[:-1] + '-names', []) or \
node['props'].get(prop_name + '-names', [])
# The first case turns 'interrupts' into 'interrupt-names'
names = node['props'].get(prop_name[:-1] + '-names', []) or \
node['props'].get(prop_name + '-names', [])
if isinstance(names, list):
# Allow the list of names to be modified in-place without