*参照元 [#l128a189] #backlinks *説明 [#ce0f4fa2] -パス: [[linux-4.4.1/drivers/pinctrl/core.c]] -FIXME: これは何? --説明 **引数 [#ue787bed] -struct pinctrl_dev *pctldev -- --[[linux-4.4.1/pinctrl_dev]] -unsigned gpio -- **返り値 [#ab31423d] -static struct pinctrl_gpio_range * -- --[[linux-4.4.1/pinctrl_gpio_range]] **参考 [#f9d17b68] *実装 [#bd6c09b4] /** * pinctrl_match_gpio_range() - check if a certain GPIO pin is in range * @pctldev: pin controller device to check * @gpio: gpio pin to check taken from the global GPIO pin space * * Tries to match a GPIO pin number to the ranges handled by a certain pin * controller, return the range or NULL */ static struct pinctrl_gpio_range * pinctrl_match_gpio_range(struct pinctrl_dev *pctldev, unsigned gpio) { struct pinctrl_gpio_range *range = NULL; - --[[linux-4.4.1/pinctrl_gpio_range]] mutex_lock(&pctldev->mutex); /* Loop over the ranges */ list_for_each_entry(range, &pctldev->gpio_ranges, node) { -gpio_ranges の設定箇所 --[[linux-4.4.1/pinctrl_add_gpio_range()]] /* Check if we're in the valid range */ if (gpio >= range->base && gpio < range->base + range->npins) { mutex_unlock(&pctldev->mutex); return range; } } mutex_unlock(&pctldev->mutex); - --[[linux-4.4.1/mutex_lock()]] --[[linux-4.4.1/list_for_each_entry()]] --[[linux-4.4.1/mutex_unlock()]] return NULL; } *コメント [#qd640044]