The optional argument pattern is a glob pattern that will be used to match against register names. By default, all registers in the bank will be matched.
The optional argument substr is a convenience for using the pattern argument. For example, substr=foo is equivalent to using pattern="*foo*".
-s, if provided, will sort the output by the name of the registers instead of their offsets, which is the default.
-description, if provided, the register description will be output for each register that has description.
If used in an expression, the return value is a list of lists in the format [[<offset>, <bank>, <name>, <size>, <value>]*]. The returned list is always sorted by offsets and not affected by the -s flag.