hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/iio/common/ssp_sensors/ssp_spi.c
....@@ -1,16 +1,6 @@
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 #include "ssp.h"
....@@ -165,9 +155,9 @@
165155 {
166156 int delay_cnt = 0;
167157
168
- gpio_set_value_cansleep(data->ap_mcu_gpio, state);
158
+ gpiod_set_value_cansleep(data->ap_mcu_gpiod, state);
169159
170
- while (gpio_get_value_cansleep(data->mcu_ap_gpio) != state) {
160
+ while (gpiod_get_value_cansleep(data->mcu_ap_gpiod) != state) {
171161 usleep_range(3000, 3500);
172162
173163 if (data->shut_down || delay_cnt++ > 500) {
....@@ -175,7 +165,7 @@
175165 __func__, state);
176166
177167 if (!state)
178
- gpio_set_value_cansleep(data->ap_mcu_gpio, 1);
168
+ gpiod_set_value_cansleep(data->ap_mcu_gpiod, 1);
179169
180170 return -ETIMEDOUT;
181171 }
....@@ -207,7 +197,7 @@
207197
208198 status = spi_write(data->spi, msg->buffer, SSP_HEADER_SIZE);
209199 if (status < 0) {
210
- gpio_set_value_cansleep(data->ap_mcu_gpio, 1);
200
+ gpiod_set_value_cansleep(data->ap_mcu_gpiod, 1);
211201 dev_err(SSP_DEV, "%s spi_write fail\n", __func__);
212202 goto _error_locked;
213203 }