mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04: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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
c8ce878206
commit
586a87e6ed
7 changed files with 177 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue