summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-07-20 11:57:40 -0600
committerStephen Warren <swarren@nvidia.com>2015-07-20 12:02:50 -0600
commit992e36e36c8ff3a91c6d4578d2c2f76ed946f99b (patch)
tree605d192b1ca2080c1f8e729e235a8f2821c681c0
parent9cbc01bd915f0162ff63c27080acce4f5555bf1e (diff)
downloadtegra-pinmux-scripts-992e36e36c8ff3a91c6d4578d2c2f76ed946f99b.tar.gz
csv-to-board: handle missing gpio_init_vals
Some board spreadsheets have missing values in the gpio_init_val column. This occurs to handle initialization ordering quirks in downstream SW. Modify csv-to-board to handle such spreadsheets without throwing an error, but warn the user that they need to fix up the resultant config file with valid data. Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rwxr-xr-xcsv-to-board.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/csv-to-board.py b/csv-to-board.py
index 6049346..1d98cfa 100755
--- a/csv-to-board.py
+++ b/csv-to-board.py
@@ -159,8 +159,13 @@ def e_input_munge(d):
'ENABLE': True,
}[d]
+warn_empty_gpio_init_val = False
def gpio_init_val_munge(d):
+ global warn_empty_gpio_init_val
+ if d == '':
+ warn_empty_gpio_init_val = True
return {
+ '': 'out?',
'0': 'out0',
'1': 'out1',
}[d]
@@ -326,3 +331,6 @@ with open(cfgfile, 'wt') as fh:
print('mipi_pad_ctrl_groups = (', file=fh)
dump_py_table(mipi_headings, mipi_table, file=fh)
print(')', file=fh)
+
+if warn_empty_gpio_init_val:
+ print('WARNING: Missing gpio_init_vals detected. Manual fixup required', file=sys.stderr)