*参照元 [#o326b7f4]
#backlinks

*説明 [#mc9748e3]
-パス: [[linux-4.4.1/drivers/pinctrl/core.c]]

-FIXME: これは何?
--説明


**引数 [#d83a1c3a]
-unsigned gpio
--
-struct pinctrl_dev **outdev
--
--[[linux-4.4.1/pinctrl_dev]]
-struct pinctrl_gpio_range **outrange
--
--[[linux-4.4.1/pinctrl_gpio_range]]


**返り値 [#u8199824]
-int
--


**参考 [#z07a2cfd]


*実装 [#b13646b2]
 /**
  * pinctrl_get_device_gpio_range() - find device for GPIO range
  * @gpio: the pin to locate the pin controller for
  * @outdev: the pin control device if found
  * @outrange: the GPIO range if found
  *
  * Find the pin controller handling a certain GPIO pin from the pinspace of
  * the GPIO subsystem, return the device and the matching GPIO range. Returns
  * -EPROBE_DEFER if the GPIO range could not be found in any device since it
  * may still have not been registered.
  */
 static int pinctrl_get_device_gpio_range(unsigned gpio,
                                          struct pinctrl_dev **outdev,
                                          struct pinctrl_gpio_range **outrange)
 {
         struct pinctrl_dev *pctldev = NULL;
 
-
--[[linux-4.4.1/pinctrl_dev]]

         mutex_lock(&pinctrldev_list_mutex);
 
-
--[[linux-4.4.1/mutex_lock()]]
--[[linux-4.4.1/pinctrldev_list_mutex(global)]]

         /* Loop over the pin controllers */
         list_for_each_entry(pctldev, &pinctrldev_list, node) {
                 struct pinctrl_gpio_range *range;
 
-
--[[linux-4.4.1/list_for_each_entry()]]
--[[linux-4.4.1/pinctrldev_list(global)]]
--[[linux-4.4.1/pinctrl_gpio_range]]

                 range = pinctrl_match_gpio_range(pctldev, gpio);
                 if (range != NULL) {
                         *outdev = pctldev;
                         *outrange = range;
                         mutex_unlock(&pinctrldev_list_mutex);
                         return 0;
                 }
-
--[[linux-4.4.1/pinctrl_match_gpio_range()]]
--[[linux-4.4.1/mutex_unlock()]]

         }
 
         mutex_unlock(&pinctrldev_list_mutex);
 
         return -EPROBE_DEFER;
 }


*コメント [#za7cce15]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS