diff options
author | Stephen Warren <swarren@nvidia.com> | 2014-08-21 17:23:47 -0600 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2014-08-21 17:24:43 -0600 |
commit | 7177283483479405a5f9b4406ce4dde5e813fd8d (patch) | |
tree | 0eebf81515cf69e888a859e9cbfbe96f225a7b08 /tegra_pmx_board_parser.py | |
parent | 8b77013470e2eab19151e06b82505eb309ef394f (diff) | |
download | tegra-pinmux-scripts-7177283483479405a5f9b4406ce4dde5e813fd8d.tar.gz |
Warn about unconfigured pins
When generating a kernel or U-Boot pinmux configuration, complain about
pins that have no configuration. That's probably a bug in the spreadsheet.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'tegra_pmx_board_parser.py')
-rw-r--r-- | tegra_pmx_board_parser.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tegra_pmx_board_parser.py b/tegra_pmx_board_parser.py index 352bbe0..7b45abe 100644 --- a/tegra_pmx_board_parser.py +++ b/tegra_pmx_board_parser.py @@ -19,6 +19,7 @@ # DEALINGS IN THE SOFTWARE. import os.path +import sys import tegra_pmx_soc_parser from tegra_pmx_parser_utils import * @@ -62,6 +63,13 @@ class Board(TopLevelParsedObj): def pincfgs_by_num(self): return self._pincfgs_by_num + def warn_about_unconfigured_pins(self): + unconfigured_gpio_pins = {gpio_pin.fullname for gpio_pin in self.soc.gpios_pins_by_num()} + for gpio_pin in self.pincfgs_by_num(): + unconfigured_gpio_pins.remove(gpio_pin.gpio_pin.fullname) + for gpio_pin in unconfigured_gpio_pins: + print('WARNING: Unconfigured pin ' + gpio_pin, file=sys.stderr) + def load_board(boardname): fn = os.path.join(configs_dir, boardname + '.board') d = {} |