| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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 | | - * |
|---|
| 14 | 4 | */ |
|---|
| 15 | 5 | |
|---|
| 16 | 6 | #include "ssp.h" |
|---|
| .. | .. |
|---|
| 165 | 155 | { |
|---|
| 166 | 156 | int delay_cnt = 0; |
|---|
| 167 | 157 | |
|---|
| 168 | | - gpio_set_value_cansleep(data->ap_mcu_gpio, state); |
|---|
| 158 | + gpiod_set_value_cansleep(data->ap_mcu_gpiod, state); |
|---|
| 169 | 159 | |
|---|
| 170 | | - while (gpio_get_value_cansleep(data->mcu_ap_gpio) != state) { |
|---|
| 160 | + while (gpiod_get_value_cansleep(data->mcu_ap_gpiod) != state) { |
|---|
| 171 | 161 | usleep_range(3000, 3500); |
|---|
| 172 | 162 | |
|---|
| 173 | 163 | if (data->shut_down || delay_cnt++ > 500) { |
|---|
| .. | .. |
|---|
| 175 | 165 | __func__, state); |
|---|
| 176 | 166 | |
|---|
| 177 | 167 | if (!state) |
|---|
| 178 | | - gpio_set_value_cansleep(data->ap_mcu_gpio, 1); |
|---|
| 168 | + gpiod_set_value_cansleep(data->ap_mcu_gpiod, 1); |
|---|
| 179 | 169 | |
|---|
| 180 | 170 | return -ETIMEDOUT; |
|---|
| 181 | 171 | } |
|---|
| .. | .. |
|---|
| 207 | 197 | |
|---|
| 208 | 198 | status = spi_write(data->spi, msg->buffer, SSP_HEADER_SIZE); |
|---|
| 209 | 199 | if (status < 0) { |
|---|
| 210 | | - gpio_set_value_cansleep(data->ap_mcu_gpio, 1); |
|---|
| 200 | + gpiod_set_value_cansleep(data->ap_mcu_gpiod, 1); |
|---|
| 211 | 201 | dev_err(SSP_DEV, "%s spi_write fail\n", __func__); |
|---|
| 212 | 202 | goto _error_locked; |
|---|
| 213 | 203 | } |
|---|