fexc: add port:power support
This commit is contained in:
parent
815691218a
commit
dbc4515eed
@ -253,8 +253,10 @@ static int decompile_section(void *bin, size_t UNUSED(bin_size),
|
||||
if (words != 6) {
|
||||
pr_err("%s: %s.%s: invalid length %d (assuming %d)\n",
|
||||
filename, section->name, entry->name, words, 6);
|
||||
} else if (gpio->port == 0xffff) {
|
||||
; /* port:power */
|
||||
} else if (gpio->port < 1 || gpio->port > 10) {
|
||||
pr_err("%s: %s.%s: unknown GPIO port type %d\n",
|
||||
pr_err("%s: %s.%s: unknown GPIO port type %u\n",
|
||||
filename, section->name, entry->name, gpio->port);
|
||||
goto failure;
|
||||
}
|
||||
|
||||
10
script_fex.c
10
script_fex.c
@ -125,8 +125,14 @@ int script_generate_fex(FILE *out, const char *UNUSED(filename),
|
||||
struct script_gpio_entry *gpio;
|
||||
gpio = container_of(entry, struct script_gpio_entry, entry);
|
||||
|
||||
port += gpio->port;
|
||||
fprintf(out, "%s = port:P%c%02d", entry->name, port, gpio->port_num);
|
||||
if (gpio->port == 0xffff) {
|
||||
fprintf(out, "%s = port:power%u", entry->name,
|
||||
gpio->port_num);
|
||||
} else {
|
||||
port += gpio->port;
|
||||
fprintf(out, "%s = port:P%c%02u", entry->name,
|
||||
port, gpio->port_num);
|
||||
}
|
||||
for (const int *p = gpio->data, *pe = p+4; p != pe; p++) {
|
||||
if (*p == -1)
|
||||
fputs("<default>", out);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user