File tree Expand file tree Collapse file tree 5 files changed +0
-103
lines changed Expand file tree Collapse file tree 5 files changed +0
-103
lines changed Original file line number Diff line number Diff line change @@ -225,8 +225,6 @@ setup or driver probe/teardown code, so this is an easy constraint.)::
225
225
gpio_request()
226
226
227
227
## gpio_request_one()
228
- ## gpio_request_array()
229
- ## gpio_free_array()
230
228
231
229
gpio_free()
232
230
@@ -295,14 +293,6 @@ are claimed, three additional calls are defined::
295
293
*/
296
294
int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
297
295
298
- /* request multiple GPIOs in a single call
299
- */
300
- int gpio_request_array(struct gpio *array, size_t num);
301
-
302
- /* release multiple GPIOs in a single call
303
- */
304
- void gpio_free_array(struct gpio *array, size_t num);
305
-
306
296
where 'flags' is currently defined to specify the following properties:
307
297
308
298
* GPIOF_DIR_IN - to configure direction as input
@@ -341,12 +331,6 @@ A typical example of usage::
341
331
if (err)
342
332
...
343
333
344
- err = gpio_request_array(leds_gpios, ARRAY_SIZE(leds_gpios));
345
- if (err)
346
- ...
347
-
348
- gpio_free_array(leds_gpios, ARRAY_SIZE(leds_gpios));
349
-
350
334
351
335
GPIOs mapped to IRQs
352
336
--------------------
Original file line number Diff line number Diff line change @@ -208,8 +208,6 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其
208
208
gpio_request()
209
209
210
210
## gpio_request_one()
211
- ## gpio_request_array()
212
- ## gpio_free_array()
213
211
214
212
gpio_free()
215
213
@@ -272,14 +270,6 @@ gpio_request()前将这类细节配置好,例如使用引脚控制子系统的
272
270
*/
273
271
int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
274
272
275
- /* 在单个函数中申请多个 GPIO
276
- */
277
- int gpio_request_array(struct gpio *array, size_t num);
278
-
279
- /* 在单个函数中释放多个 GPIO
280
- */
281
- void gpio_free_array(struct gpio *array, size_t num);
282
-
283
273
这里 'flags' 当前定义可指定以下属性:
284
274
285
275
* GPIOF_DIR_IN - 配置方向为输入
@@ -317,12 +307,6 @@ gpio_request()前将这类细节配置好,例如使用引脚控制子系统的
317
307
if (err)
318
308
...
319
309
320
- err = gpio_request_array(leds_gpios, ARRAY_SIZE(leds_gpios));
321
- if (err)
322
- ...
323
-
324
- gpio_free_array(leds_gpios, ARRAY_SIZE(leds_gpios));
325
-
326
310
327
311
GPIO 映射到 IRQ
328
312
----------------
Original file line number Diff line number Diff line change @@ -215,13 +215,10 @@ GPIO 值的命令需要等待其信息排到隊首才發送命令,再獲得其
215
215
gpio_request()
216
216
217
217
## gpio_request_one()
218
- ## gpio_request_array()
219
- ## gpio_free_array()
220
218
221
219
gpio_free()
222
220
223
221
224
-
225
222
聲明和釋放 GPIO
226
223
----------------------------
227
224
爲了有助於捕獲系統配置錯誤,定義了兩個函數。
@@ -278,14 +275,6 @@ gpio_request()前將這類細節配置好,例如使用 pinctrl 子系統的映
278
275
*/
279
276
int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
280
277
281
- /* 在單個函數中申請多個 GPIO
282
- */
283
- int gpio_request_array(struct gpio *array, size_t num);
284
-
285
- /* 在單個函數中釋放多個 GPIO
286
- */
287
- void gpio_free_array(struct gpio *array, size_t num);
288
-
289
278
這裡 'flags' 當前定義可指定以下屬性:
290
279
291
280
* GPIOF_DIR_IN - 配置方向爲輸入
@@ -323,12 +312,6 @@ gpio_request()前將這類細節配置好,例如使用 pinctrl 子系統的映
323
312
if (err)
324
313
...
325
314
326
- err = gpio_request_array(leds_gpios, ARRAY_SIZE(leds_gpios));
327
- if (err)
328
- ...
329
-
330
- gpio_free_array(leds_gpios, ARRAY_SIZE(leds_gpios));
331
-
332
315
333
316
GPIO 映射到 IRQ
334
317
--------------------
Original file line number Diff line number Diff line change @@ -72,42 +72,3 @@ int gpio_request(unsigned gpio, const char *label)
72
72
return gpiod_request (desc , label );
73
73
}
74
74
EXPORT_SYMBOL_GPL (gpio_request );
75
-
76
- /**
77
- * gpio_request_array - request multiple GPIOs in a single call
78
- * @array: array of the 'struct gpio'
79
- * @num: how many GPIOs in the array
80
- *
81
- * **DEPRECATED** This function is deprecated and must not be used in new code.
82
- */
83
- int gpio_request_array (const struct gpio * array , size_t num )
84
- {
85
- int i , err ;
86
-
87
- for (i = 0 ; i < num ; i ++ , array ++ ) {
88
- err = gpio_request_one (array -> gpio , array -> flags , array -> label );
89
- if (err )
90
- goto err_free ;
91
- }
92
- return 0 ;
93
-
94
- err_free :
95
- while (i -- )
96
- gpio_free ((-- array )-> gpio );
97
- return err ;
98
- }
99
- EXPORT_SYMBOL_GPL (gpio_request_array );
100
-
101
- /**
102
- * gpio_free_array - release multiple GPIOs in a single call
103
- * @array: array of the 'struct gpio'
104
- * @num: how many GPIOs in the array
105
- *
106
- * **DEPRECATED** This function is deprecated and must not be used in new code.
107
- */
108
- void gpio_free_array (const struct gpio * array , size_t num )
109
- {
110
- while (num -- )
111
- gpio_free ((array ++ )-> gpio );
112
- }
113
- EXPORT_SYMBOL_GPL (gpio_free_array );
Original file line number Diff line number Diff line change @@ -114,8 +114,6 @@ static inline int gpio_to_irq(unsigned gpio)
114
114
}
115
115
116
116
int gpio_request_one (unsigned gpio , unsigned long flags , const char * label );
117
- int gpio_request_array (const struct gpio * array , size_t num );
118
- void gpio_free_array (const struct gpio * array , size_t num );
119
117
120
118
/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */
121
119
@@ -146,11 +144,6 @@ static inline int gpio_request_one(unsigned gpio,
146
144
return - ENOSYS ;
147
145
}
148
146
149
- static inline int gpio_request_array (const struct gpio * array , size_t num )
150
- {
151
- return - ENOSYS ;
152
- }
153
-
154
147
static inline void gpio_free (unsigned gpio )
155
148
{
156
149
might_sleep ();
@@ -159,14 +152,6 @@ static inline void gpio_free(unsigned gpio)
159
152
WARN_ON (1 );
160
153
}
161
154
162
- static inline void gpio_free_array (const struct gpio * array , size_t num )
163
- {
164
- might_sleep ();
165
-
166
- /* GPIO can never have been requested */
167
- WARN_ON (1 );
168
- }
169
-
170
155
static inline int gpio_direction_input (unsigned gpio )
171
156
{
172
157
return - ENOSYS ;
You can’t perform that action at this time.
0 commit comments