diff options
author | Vladimir Zapolskiy <vz@mleia.com> | 2016-09-07 19:58:32 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-09-12 08:23:37 -0400 |
commit | 14bf873e5921fd414cf6f0b31b799eeabd27dd74 (patch) | |
tree | 145a90d121760030563e671d438b056396e7257e | |
parent | 332e99d5ae4056523bcb24ab16cd7a41474c4807 (diff) |
gpio: lpc32xx: remove unused platform data file
ARM LPC32xx platform is device-tree only, there is no need to keep
a file with GPIO platform data structures, however some of macro
definitions should be moved to the driver code, which is the only user
of the removed header file.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r-- | drivers/gpio/gpio-lpc32xx.c | 15 | ||||
-rw-r--r-- | include/linux/platform_data/gpio-lpc32xx.h | 50 |
2 files changed, 14 insertions, 51 deletions
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c index fc5f197906ac..92b3ae2a6735 100644 --- a/drivers/gpio/gpio-lpc32xx.c +++ b/drivers/gpio/gpio-lpc32xx.c | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <linux/of_gpio.h> | 25 | #include <linux/of_gpio.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/platform_data/gpio-lpc32xx.h> | ||
29 | 28 | ||
30 | #include <mach/hardware.h> | 29 | #include <mach/hardware.h> |
31 | #include <mach/platform.h> | 30 | #include <mach/platform.h> |
@@ -68,6 +67,20 @@ | |||
68 | #define GPI3_PIN_IN_SEL(x, y) (((x) >> (y)) & 1) | 67 | #define GPI3_PIN_IN_SEL(x, y) (((x) >> (y)) & 1) |
69 | #define GPO3_PIN_IN_SEL(x, y) (((x) >> (y)) & 1) | 68 | #define GPO3_PIN_IN_SEL(x, y) (((x) >> (y)) & 1) |
70 | 69 | ||
70 | #define LPC32XX_GPIO_P0_MAX 8 | ||
71 | #define LPC32XX_GPIO_P1_MAX 24 | ||
72 | #define LPC32XX_GPIO_P2_MAX 13 | ||
73 | #define LPC32XX_GPIO_P3_MAX 6 | ||
74 | #define LPC32XX_GPI_P3_MAX 29 | ||
75 | #define LPC32XX_GPO_P3_MAX 24 | ||
76 | |||
77 | #define LPC32XX_GPIO_P0_GRP 0 | ||
78 | #define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX) | ||
79 | #define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX) | ||
80 | #define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX) | ||
81 | #define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX) | ||
82 | #define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX) | ||
83 | |||
71 | struct gpio_regs { | 84 | struct gpio_regs { |
72 | void __iomem *inp_state; | 85 | void __iomem *inp_state; |
73 | void __iomem *outp_state; | 86 | void __iomem *outp_state; |
diff --git a/include/linux/platform_data/gpio-lpc32xx.h b/include/linux/platform_data/gpio-lpc32xx.h deleted file mode 100644 index a544e962a818..000000000000 --- a/include/linux/platform_data/gpio-lpc32xx.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * Author: Kevin Wells <kevin.wells@nxp.com> | ||
3 | * | ||
4 | * Copyright (C) 2010 NXP Semiconductors | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | */ | ||
16 | |||
17 | #ifndef __MACH_GPIO_LPC32XX_H | ||
18 | #define __MACH_GPIO_LPC32XX_H | ||
19 | |||
20 | /* | ||
21 | * Note! | ||
22 | * Muxed GP pins need to be setup to the GP state in the board level | ||
23 | * code prior to using this driver. | ||
24 | * GPI pins : 28xP3 group | ||
25 | * GPO pins : 24xP3 group | ||
26 | * GPIO pins: 8xP0 group, 24xP1 group, 13xP2 group, 6xP3 group | ||
27 | */ | ||
28 | |||
29 | #define LPC32XX_GPIO_P0_MAX 8 | ||
30 | #define LPC32XX_GPIO_P1_MAX 24 | ||
31 | #define LPC32XX_GPIO_P2_MAX 13 | ||
32 | #define LPC32XX_GPIO_P3_MAX 6 | ||
33 | #define LPC32XX_GPI_P3_MAX 29 | ||
34 | #define LPC32XX_GPO_P3_MAX 24 | ||
35 | |||
36 | #define LPC32XX_GPIO_P0_GRP 0 | ||
37 | #define LPC32XX_GPIO_P1_GRP (LPC32XX_GPIO_P0_GRP + LPC32XX_GPIO_P0_MAX) | ||
38 | #define LPC32XX_GPIO_P2_GRP (LPC32XX_GPIO_P1_GRP + LPC32XX_GPIO_P1_MAX) | ||
39 | #define LPC32XX_GPIO_P3_GRP (LPC32XX_GPIO_P2_GRP + LPC32XX_GPIO_P2_MAX) | ||
40 | #define LPC32XX_GPI_P3_GRP (LPC32XX_GPIO_P3_GRP + LPC32XX_GPIO_P3_MAX) | ||
41 | #define LPC32XX_GPO_P3_GRP (LPC32XX_GPI_P3_GRP + LPC32XX_GPI_P3_MAX) | ||
42 | |||
43 | /* | ||
44 | * A specific GPIO can be selected with this macro | ||
45 | * ie, GPIO_05 can be selected with LPC32XX_GPIO(LPC32XX_GPIO_P3_GRP, 5) | ||
46 | * See the LPC32x0 User's guide for GPIO group numbers | ||
47 | */ | ||
48 | #define LPC32XX_GPIO(x, y) ((x) + (y)) | ||
49 | |||
50 | #endif /* __MACH_GPIO_LPC32XX_H */ | ||