diff options
author | Tom Rini <trini@konsulko.com> | 2024-01-25 11:01:38 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-01-25 11:01:38 -0500 |
commit | e7f9e5eb584dd0b5d1b1ff82fe607d6da9940cc6 (patch) | |
tree | 5d78cc0c1339a9d7196876aa029f6e94ca247e72 /drivers | |
parent | 15e7927b5a2d33666af19879577bf0c30ab088fe (diff) | |
parent | 53c3e386063b9e1ab955d4658a035f1eea8a1cc0 (diff) |
Merge branch '2024-01-24-assorted-fixes-and-updates'
- Increase SYS_MAXARGS default, verdin-am62 improvements (and required
cleanup), assorted cleanups throughout the code base.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/reset/reset-hisilicon.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/reset/reset-hisilicon.c b/drivers/reset/reset-hisilicon.c index 8152cec2271..85e02b296b0 100644 --- a/drivers/reset/reset-hisilicon.c +++ b/drivers/reset/reset-hisilicon.c @@ -49,7 +49,18 @@ static int hisi_reset_assert(struct reset_ctl *rst) static int hisi_reset_of_xlate(struct reset_ctl *rst, struct ofnode_phandle_args *args) { - if (args->args_count != 3) { + unsigned long polarity; + + switch (args->args_count) { + case 2: + polarity = ASSERT_SET; + break; + + case 3: + polarity = args->args[2]; + break; + + default: debug("Invalid args_count: %d\n", args->args_count); return -EINVAL; } @@ -57,7 +68,7 @@ static int hisi_reset_of_xlate(struct reset_ctl *rst, /* Use .data field as register offset and .id field as bit shift */ rst->data = args->args[0]; rst->id = args->args[1]; - rst->polarity = args->args[2]; + rst->polarity = polarity; return 0; } |