hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/arm/mach-ep93xx/edb93xx.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * arch/arm/mach-ep93xx/edb93xx.c
34 * Cirrus Logic EDB93xx Development Board support.
....@@ -17,11 +18,6 @@
1718 * EDB9312
1819 * Copyright (C) 2006 Infosys Technologies Limited
1920 * Toufeeq Hussain <toufeeq_hussain@infosys.com>
20
- *
21
- * This program is free software; you can redistribute it and/or modify
22
- * it under the terms of the GNU General Public License as published by
23
- * the Free Software Foundation; either version 2 of the License, or (at
24
- * your option) any later version.
2521 */
2622
2723 #include <linux/kernel.h>
....@@ -29,13 +25,14 @@
2925 #include <linux/platform_device.h>
3026 #include <linux/i2c.h>
3127 #include <linux/spi/spi.h>
28
+#include <linux/gpio/machine.h>
3229
3330 #include <sound/cs4271.h>
3431
35
-#include <mach/hardware.h>
32
+#include "hardware.h"
3633 #include <linux/platform_data/video-ep93xx.h>
3734 #include <linux/platform_data/spi-ep93xx.h>
38
-#include <mach/gpio-ep93xx.h>
35
+#include "gpio-ep93xx.h"
3936
4037 #include <asm/mach-types.h>
4138 #include <asm/mach/arch.h>
....@@ -105,13 +102,16 @@
105102 },
106103 };
107104
108
-static int edb93xx_spi_chipselects[] __initdata = {
109
- EP93XX_GPIO_LINE_EGPIO6,
105
+static struct gpiod_lookup_table edb93xx_spi_cs_gpio_table = {
106
+ .dev_id = "spi0",
107
+ .table = {
108
+ GPIO_LOOKUP("A", 6, "cs", GPIO_ACTIVE_LOW),
109
+ { },
110
+ },
110111 };
111112
112113 static struct ep93xx_spi_info edb93xx_spi_info __initdata = {
113
- .chipselect = edb93xx_spi_chipselects,
114
- .num_chipselect = ARRAY_SIZE(edb93xx_spi_chipselects),
114
+ /* Intentionally left blank */
115115 };
116116
117117 static void __init edb93xx_register_spi(void)
....@@ -123,6 +123,7 @@
123123 else if (machine_is_edb9315a())
124124 edb93xx_cs4271_data.gpio_nreset = EP93XX_GPIO_LINE_EGPIO14;
125125
126
+ gpiod_add_lookup_table(&edb93xx_spi_cs_gpio_table);
126127 ep93xx_register_spi(&edb93xx_spi_info, edb93xx_spi_board_info,
127128 ARRAY_SIZE(edb93xx_spi_board_info));
128129 }