| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * AMx3 Wkup M3 IPC driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2015 Texas Instruments, Inc. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Dave Gerlach <d-gerlach@ti.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or |
|---|
| 9 | | - * modify it under the terms of the GNU General Public License |
|---|
| 10 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 13 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | | - * GNU General Public License for more details. |
|---|
| 16 | 8 | */ |
|---|
| 17 | 9 | |
|---|
| 18 | 10 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 57 | 49 | static struct wkup_m3_ipc *m3_ipc_state; |
|---|
| 58 | 50 | |
|---|
| 59 | 51 | static const struct wkup_m3_wakeup_src wakeups[] = { |
|---|
| 52 | + {.irq_nr = 16, .src = "PRCM"}, |
|---|
| 60 | 53 | {.irq_nr = 35, .src = "USB0_PHY"}, |
|---|
| 61 | 54 | {.irq_nr = 36, .src = "USB1_PHY"}, |
|---|
| 62 | 55 | {.irq_nr = 40, .src = "I2C0"}, |
|---|
| .. | .. |
|---|
| 454 | 447 | } |
|---|
| 455 | 448 | |
|---|
| 456 | 449 | irq = platform_get_irq(pdev, 0); |
|---|
| 457 | | - if (!irq) { |
|---|
| 450 | + if (irq < 0) { |
|---|
| 458 | 451 | dev_err(&pdev->dev, "no irq resource\n"); |
|---|
| 459 | | - return -ENXIO; |
|---|
| 452 | + return irq; |
|---|
| 460 | 453 | } |
|---|
| 461 | 454 | |
|---|
| 462 | 455 | ret = devm_request_irq(dev, irq, wkup_m3_txev_handler, |
|---|