hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/include/linux/platform_data/gpio-omap.h
....@@ -1,31 +1,19 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * OMAP GPIO handling defines and functions
34 *
45 * Copyright (C) 2003-2005 Nokia Corporation
56 *
67 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
- *
228 */
239
2410 #ifndef __ASM_ARCH_OMAP_GPIO_H
2511 #define __ASM_ARCH_OMAP_GPIO_H
2612
13
+#ifndef __ASSEMBLER__
2714 #include <linux/io.h>
2815 #include <linux/platform_device.h>
16
+#endif
2917
3018 #define OMAP1_MPUIO_BASE 0xfffb5000
3119
....@@ -97,6 +85,7 @@
9785 * omap2+ specific GPIO registers
9886 */
9987 #define OMAP24XX_GPIO_REVISION 0x0000
88
+#define OMAP24XX_GPIO_SYSCONFIG 0x0010
10089 #define OMAP24XX_GPIO_IRQSTATUS1 0x0018
10190 #define OMAP24XX_GPIO_IRQSTATUS2 0x0028
10291 #define OMAP24XX_GPIO_IRQENABLE2 0x002c
....@@ -120,6 +109,7 @@
120109 #define OMAP24XX_GPIO_SETDATAOUT 0x0094
121110
122111 #define OMAP4_GPIO_REVISION 0x0000
112
+#define OMAP4_GPIO_SYSCONFIG 0x0010
123113 #define OMAP4_GPIO_EOI 0x0020
124114 #define OMAP4_GPIO_IRQSTATUSRAW0 0x0024
125115 #define OMAP4_GPIO_IRQSTATUSRAW1 0x0028
....@@ -157,8 +147,10 @@
157147 #define OMAP_MPUIO(nr) (OMAP_MAX_GPIO_LINES + (nr))
158148 #define OMAP_GPIO_IS_MPUIO(nr) ((nr) >= OMAP_MAX_GPIO_LINES)
159149
150
+#ifndef __ASSEMBLER__
160151 struct omap_gpio_reg_offs {
161152 u16 revision;
153
+ u16 sysconfig;
162154 u16 direction;
163155 u16 datain;
164156 u16 dataout;
....@@ -197,23 +189,12 @@
197189 bool is_mpuio; /* whether the bank is of type MPUIO */
198190 u32 non_wakeup_gpios;
199191
200
- struct omap_gpio_reg_offs *regs;
192
+ const struct omap_gpio_reg_offs *regs;
201193
202194 /* Return context loss count due to PM states changing */
203195 int (*get_context_loss_count)(struct device *dev);
204196 };
205197
206
-#if IS_BUILTIN(CONFIG_GPIO_OMAP)
207
-extern void omap2_gpio_prepare_for_idle(int off_mode);
208
-extern void omap2_gpio_resume_after_idle(void);
209
-#else
210
-static inline void omap2_gpio_prepare_for_idle(int off_mode)
211
-{
212
-}
213
-
214
-static inline void omap2_gpio_resume_after_idle(void)
215
-{
216
-}
217
-#endif
198
+#endif /* __ASSEMBLER__ */
218199
219200 #endif