You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
pinctrl/gpio: non-linear GPIO ranges accesible from gpiolib
This patch adds the infrastructure required to register non-linear gpio ranges through gpiolib and the standard GPIO device tree bindings. Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
committed by
Linus Walleij
parent
c8ce878206
commit
586a87e6ed
@@ -462,6 +462,20 @@ struct pinctrl_dev *pinctrl_find_and_add_gpio_range(const char *devname,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pinctrl_find_and_add_gpio_range);
|
||||
|
||||
int pinctrl_get_group_pins(struct pinctrl_dev *pctldev, const char *pin_group,
|
||||
const unsigned **pins, unsigned *num_pins)
|
||||
{
|
||||
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
|
||||
int gs;
|
||||
|
||||
gs = pinctrl_get_group_selector(pctldev, pin_group);
|
||||
if (gs < 0)
|
||||
return gs;
|
||||
|
||||
return pctlops->get_group_pins(pctldev, gs, pins, num_pins);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pinctrl_get_group_pins);
|
||||
|
||||
/**
|
||||
* pinctrl_find_gpio_range_from_pin() - locate the GPIO range for a pin
|
||||
* @pctldev: the pin controller device to look in
|
||||
|
||||
Reference in New Issue
Block a user