| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Intel MSIC |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2011, Intel Corporation |
|---|
| 5 | 6 | * Author: Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|
| 6 | | - * |
|---|
| 7 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 8 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 9 | | - * published by the Free Software Foundation. |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/err.h> |
|---|
| .. | .. |
|---|
| 54 | 51 | }; |
|---|
| 55 | 52 | |
|---|
| 56 | 53 | static struct resource msic_touch_resources[] = { |
|---|
| 57 | | - { |
|---|
| 58 | | - .flags = IORESOURCE_IRQ, |
|---|
| 59 | | - }, |
|---|
| 54 | + DEFINE_RES_IRQ(0), |
|---|
| 60 | 55 | }; |
|---|
| 61 | 56 | |
|---|
| 62 | 57 | static struct resource msic_adc_resources[] = { |
|---|
| 63 | | - { |
|---|
| 64 | | - .flags = IORESOURCE_IRQ, |
|---|
| 65 | | - }, |
|---|
| 58 | + DEFINE_RES_IRQ(0), |
|---|
| 66 | 59 | }; |
|---|
| 67 | 60 | |
|---|
| 68 | 61 | static struct resource msic_battery_resources[] = { |
|---|
| 69 | | - { |
|---|
| 70 | | - .flags = IORESOURCE_IRQ, |
|---|
| 71 | | - }, |
|---|
| 62 | + DEFINE_RES_IRQ(0), |
|---|
| 72 | 63 | }; |
|---|
| 73 | 64 | |
|---|
| 74 | 65 | static struct resource msic_gpio_resources[] = { |
|---|
| 75 | | - { |
|---|
| 76 | | - .flags = IORESOURCE_IRQ, |
|---|
| 77 | | - }, |
|---|
| 66 | + DEFINE_RES_IRQ(0), |
|---|
| 78 | 67 | }; |
|---|
| 79 | 68 | |
|---|
| 80 | 69 | static struct resource msic_audio_resources[] = { |
|---|
| 81 | | - { |
|---|
| 82 | | - .name = "IRQ", |
|---|
| 83 | | - .flags = IORESOURCE_IRQ, |
|---|
| 84 | | - }, |
|---|
| 70 | + DEFINE_RES_IRQ_NAMED(0, "IRQ"), |
|---|
| 85 | 71 | /* |
|---|
| 86 | 72 | * We will pass IRQ_BASE to the driver now but this can be removed |
|---|
| 87 | 73 | * when/if the driver starts to use intel_msic_irq_read(). |
|---|
| 88 | 74 | */ |
|---|
| 89 | | - { |
|---|
| 90 | | - .name = "IRQ_BASE", |
|---|
| 91 | | - .flags = IORESOURCE_MEM, |
|---|
| 92 | | - .start = MSIC_IRQ_STATUS_ACCDET, |
|---|
| 93 | | - .end = MSIC_IRQ_STATUS_ACCDET, |
|---|
| 94 | | - }, |
|---|
| 75 | + DEFINE_RES_MEM_NAMED(MSIC_IRQ_STATUS_ACCDET, 1, "IRQ_BASE"), |
|---|
| 95 | 76 | }; |
|---|
| 96 | 77 | |
|---|
| 97 | 78 | static struct resource msic_hdmi_resources[] = { |
|---|
| 98 | | - { |
|---|
| 99 | | - .flags = IORESOURCE_IRQ, |
|---|
| 100 | | - }, |
|---|
| 79 | + DEFINE_RES_IRQ(0), |
|---|
| 101 | 80 | }; |
|---|
| 102 | 81 | |
|---|
| 103 | 82 | static struct resource msic_thermal_resources[] = { |
|---|
| 104 | | - { |
|---|
| 105 | | - .flags = IORESOURCE_IRQ, |
|---|
| 106 | | - }, |
|---|
| 83 | + DEFINE_RES_IRQ(0), |
|---|
| 107 | 84 | }; |
|---|
| 108 | 85 | |
|---|
| 109 | 86 | static struct resource msic_power_btn_resources[] = { |
|---|
| 110 | | - { |
|---|
| 111 | | - .flags = IORESOURCE_IRQ, |
|---|
| 112 | | - }, |
|---|
| 87 | + DEFINE_RES_IRQ(0), |
|---|
| 113 | 88 | }; |
|---|
| 114 | 89 | |
|---|
| 115 | 90 | static struct resource msic_ocd_resources[] = { |
|---|
| 116 | | - { |
|---|
| 117 | | - .flags = IORESOURCE_IRQ, |
|---|
| 118 | | - }, |
|---|
| 91 | + DEFINE_RES_IRQ(0), |
|---|
| 119 | 92 | }; |
|---|
| 120 | 93 | |
|---|
| 121 | 94 | /* |
|---|