forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/iio/common/ssp_sensors/ssp.h
....@@ -1,23 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (C) 2014, Samsung Electronics Co. Ltd. All Rights Reserved.
3
- *
4
- * This program is free software; you can redistribute it and/or modify
5
- * it under the terms of the GNU General Public License as published by
6
- * the Free Software Foundation; either version 2 of the License, or
7
- * (at your option) any later version.
8
- *
9
- * This program is distributed in the hope that it will be useful,
10
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- * GNU General Public License for more details.
13
- *
144 */
155
166 #ifndef __SSP_SENSORHUB_H__
177 #define __SSP_SENSORHUB_H__
188
199 #include <linux/delay.h>
20
-#include <linux/gpio.h>
10
+#include <linux/gpio/consumer.h>
2111 #include <linux/iio/common/ssp_sensors.h>
2212 #include <linux/iio/iio.h>
2313 #include <linux/spi/spi.h>
....@@ -178,9 +168,9 @@
178168 * @fw_dl_state: firmware download state
179169 * @comm_lock: lock protecting the handshake
180170 * @pending_lock: lock protecting pending list and completion
181
- * @mcu_reset_gpio: mcu reset line
182
- * @ap_mcu_gpio: ap to mcu gpio line
183
- * @mcu_ap_gpio: mcu to ap gpio line
171
+ * @mcu_reset_gpiod: mcu reset line
172
+ * @ap_mcu_gpiod: ap to mcu gpio line
173
+ * @mcu_ap_gpiod: mcu to ap gpio line
184174 * @pending_list: pending list for messages queued to be sent/read
185175 * @sensor_devs: registered IIO devices table
186176 * @enable_refcount: enable reference count for wdt (watchdog timer)
....@@ -222,9 +212,9 @@
222212 struct mutex comm_lock;
223213 struct mutex pending_lock;
224214
225
- int mcu_reset_gpio;
226
- int ap_mcu_gpio;
227
- int mcu_ap_gpio;
215
+ struct gpio_desc *mcu_reset_gpiod;
216
+ struct gpio_desc *ap_mcu_gpiod;
217
+ struct gpio_desc *mcu_ap_gpiod;
228218
229219 struct list_head pending_list;
230220