File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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.)::
225225 gpio_request()
226226
227227 ## gpio_request_one()
228- ## gpio_request_array()
229- ## gpio_free_array()
230228
231229 gpio_free()
232230
@@ -295,14 +293,6 @@ are claimed, three additional calls are defined::
295293 */
296294 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
297295
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-
306296where 'flags' is currently defined to specify the following properties:
307297
308298 * GPIOF_DIR_IN - to configure direction as input
@@ -341,12 +331,6 @@ A typical example of usage::
341331 if (err)
342332 ...
343333
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-
350334
351335GPIOs mapped to IRQs
352336--------------------
Original file line number Diff line number Diff line change @@ -208,8 +208,6 @@ GPIO 值的命令需要等待其信息排到队首才发送命令,再获得其
208208 gpio_request()
209209
210210 ## gpio_request_one()
211- ## gpio_request_array()
212- ## gpio_free_array()
213211
214212 gpio_free()
215213
@@ -272,14 +270,6 @@ gpio_request()前将这类细节配置好,例如使用引脚控制子系统的
272270 */
273271 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
274272
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-
283273这里 'flags' 当前定义可指定以下属性:
284274
285275 * GPIOF_DIR_IN - 配置方向为输入
@@ -317,12 +307,6 @@ gpio_request()前将这类细节配置好,例如使用引脚控制子系统的
317307 if (err)
318308 ...
319309
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-
326310
327311GPIO 映射到 IRQ
328312----------------
Original file line number Diff line number Diff line change @@ -215,13 +215,10 @@ GPIO 值的命令需要等待其信息排到隊首才發送命令,再獲得其
215215 gpio_request()
216216
217217## gpio_request_one()
218- ## gpio_request_array()
219- ## gpio_free_array()
220218
221219 gpio_free()
222220
223221
224-
225222聲明和釋放 GPIO
226223----------------------------
227224爲了有助於捕獲系統配置錯誤,定義了兩個函數。
@@ -278,14 +275,6 @@ gpio_request()前將這類細節配置好,例如使用 pinctrl 子系統的映
278275 */
279276 int gpio_request_one(unsigned gpio, unsigned long flags, const char *label);
280277
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-
289278這裡 'flags' 當前定義可指定以下屬性:
290279
291280 * GPIOF_DIR_IN - 配置方向爲輸入
@@ -323,12 +312,6 @@ gpio_request()前將這類細節配置好,例如使用 pinctrl 子系統的映
323312 if (err)
324313 ...
325314
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-
332315
333316GPIO 映射到 IRQ
334317--------------------
Original file line number Diff line number Diff line change @@ -72,42 +72,3 @@ int gpio_request(unsigned gpio, const char *label)
7272 return gpiod_request (desc , label );
7373}
7474EXPORT_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)
114114}
115115
116116int 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 );
119117
120118/* CONFIG_GPIOLIB: bindings for managed devices that want to request gpios */
121119
@@ -146,11 +144,6 @@ static inline int gpio_request_one(unsigned gpio,
146144 return - ENOSYS ;
147145}
148146
149- static inline int gpio_request_array (const struct gpio * array , size_t num )
150- {
151- return - ENOSYS ;
152- }
153-
154147static inline void gpio_free (unsigned gpio )
155148{
156149 might_sleep ();
@@ -159,14 +152,6 @@ static inline void gpio_free(unsigned gpio)
159152 WARN_ON (1 );
160153}
161154
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-
170155static inline int gpio_direction_input (unsigned gpio )
171156{
172157 return - ENOSYS ;
You can’t perform that action at this time.
0 commit comments