hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/gpio/gpio-viperboard.c
....@@ -1,15 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Nano River Technologies viperboard GPIO lib driver
34 *
45 * (C) 2012 by Lemonage GmbH
56 * Author: Lars Poeschel <poeschel@lemonage.de>
67 * All rights reserved.
7
- *
8
- * This program is free software; you can redistribute it and/or modify it
9
- * under the terms of the GNU General Public License as published by the
10
- * Free Software Foundation; either version 2 of the License, or (at your
11
- * option) any later version.
12
- *
138 */
149
1510 #include <linux/kernel.h>
....@@ -19,9 +14,8 @@
1914 #include <linux/types.h>
2015 #include <linux/mutex.h>
2116 #include <linux/platform_device.h>
22
-
2317 #include <linux/usb.h>
24
-#include <linux/gpio.h>
18
+#include <linux/gpio/driver.h>
2519
2620 #include <linux/mfd/viperboard.h>
2721
....@@ -85,7 +79,7 @@
8579 /* ----- begin of gipo a chip -------------------------------------------- */
8680
8781 static int vprbrd_gpioa_get(struct gpio_chip *chip,
88
- unsigned offset)
82
+ unsigned int offset)
8983 {
9084 int ret, answer, error = 0;
9185 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);
....@@ -135,7 +129,7 @@
135129 }
136130
137131 static void vprbrd_gpioa_set(struct gpio_chip *chip,
138
- unsigned offset, int value)
132
+ unsigned int offset, int value)
139133 {
140134 int ret;
141135 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);
....@@ -176,7 +170,7 @@
176170 }
177171
178172 static int vprbrd_gpioa_direction_input(struct gpio_chip *chip,
179
- unsigned offset)
173
+ unsigned int offset)
180174 {
181175 int ret;
182176 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);
....@@ -213,7 +207,7 @@
213207 }
214208
215209 static int vprbrd_gpioa_direction_output(struct gpio_chip *chip,
216
- unsigned offset, int value)
210
+ unsigned int offset, int value)
217211 {
218212 int ret;
219213 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);
....@@ -257,8 +251,8 @@
257251
258252 /* ----- begin of gipo b chip -------------------------------------------- */
259253
260
-static int vprbrd_gpiob_setdir(struct vprbrd *vb, unsigned offset,
261
- unsigned dir)
254
+static int vprbrd_gpiob_setdir(struct vprbrd *vb, unsigned int offset,
255
+ unsigned int dir)
262256 {
263257 struct vprbrd_gpiob_msg *gbmsg = (struct vprbrd_gpiob_msg *)vb->buf;
264258 int ret;
....@@ -279,7 +273,7 @@
279273 }
280274
281275 static int vprbrd_gpiob_get(struct gpio_chip *chip,
282
- unsigned offset)
276
+ unsigned int offset)
283277 {
284278 int ret;
285279 u16 val;
....@@ -311,7 +305,7 @@
311305 }
312306
313307 static void vprbrd_gpiob_set(struct gpio_chip *chip,
314
- unsigned offset, int value)
308
+ unsigned int offset, int value)
315309 {
316310 int ret;
317311 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);
....@@ -344,7 +338,7 @@
344338 }
345339
346340 static int vprbrd_gpiob_direction_input(struct gpio_chip *chip,
347
- unsigned offset)
341
+ unsigned int offset)
348342 {
349343 int ret;
350344 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);
....@@ -365,7 +359,7 @@
365359 }
366360
367361 static int vprbrd_gpiob_direction_output(struct gpio_chip *chip,
368
- unsigned offset, int value)
362
+ unsigned int offset, int value)
369363 {
370364 int ret;
371365 struct vprbrd_gpio *gpio = gpiochip_get_data(chip);