script: Fix the gpio script for bit > 9
authorNikhil Devshatwar <nikhil.nd@ti.com>
Mon, 14 Sep 2015 16:16:38 +0000 (21:46 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Mon, 14 Sep 2015 16:16:42 +0000 (21:46 +0530)
Fix a bug where the script would only consider first bit for the gpio pin
e.g. GPIO7_10 would be read to extract bit number '1' instead of '10'

Fix the regular expression to correct the script generation.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
iodelay-autogen.py

index 6a94b324676d35ed96ffdfcb45623167bf41ef9f..d6a8701f91a3a63ae3dd1b2be4c767ed6be36aba 100755 (executable)
@@ -336,7 +336,7 @@ def pad_dump_gpio(padconf, per_padconf):
 
                offset = addr - 0x4a002000
                gpio_name = xml_pad_get_pin(offset, 14)
 
                offset = addr - 0x4a002000
                gpio_name = xml_pad_get_pin(offset, 14)
-               matchlist = re.match("GPIO(.)_(.)", gpio_name)
+               matchlist = re.match("GPIO(.)_(.*)", gpio_name)
                if (matchlist == None):
                        print "ERR: No GPIO for pad %s" % pad_name
                        continue
                if (matchlist == None):
                        print "ERR: No GPIO for pad %s" % pad_name
                        continue