diff options
author | Haojian Zhuang <haojian.zhuang@linaro.org> | 2013-02-17 12:42:52 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-03-07 05:27:30 +0100 |
commit | a1a277eb76b3507df7c41774048a644aa4dfd096 (patch) | |
tree | 8f48089478f87dff9a37284af6a1c68ca7911a26 /drivers/pinctrl/pinconf.h | |
parent | gpio: pl061: bind pinctrl by gpio request (diff) | |
download | linux-a1a277eb76b3507df7c41774048a644aa4dfd096.tar.xz linux-a1a277eb76b3507df7c41774048a644aa4dfd096.zip |
pinctrl: single: create new gpio function range
Since gpio driver could create gpio range in DTS, it could invoke
pinctrl_request_gpio(). In the pinctrl-single driver, it needs to
configure pins with gpio function mode.
A new gpio function range should be created in DTS file in below.
pinctrl-single,gpio-range = <phandle pin_offset nr_pins gpio_func>;
range: gpio-range {
#pinctrl-single,gpio-range-cells = <3>;
};
The gpio-ranges property is used in gpio driver and the
pinctrl-single,gpio-range property is used in pinctrl-single driver.
1. gpio-ranges is used for gpio driver in below.
gpio-ranges = <phandle gpio_offset_in_chip pin_offset nr_pins>
gpio-ranges = < &pmx0 0 89 1 &pmx0 1 89 1 &pmx0 2 90 1
&pmx0 3 90 1 &pmx0 4 91 1 &pmx0 5 92 1>;
2. gpio driver could get pin offset from gpio-ranges property.
pinctrl-single driver could get gpio function mode from gpio_func
that is stored in @gpiofuncs list in struct pcs_device.
This new pinctrl-single,gpio-range is used as complement for
gpio-ranges property in gpio driver.
Signed-off-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf.h')
0 files changed, 0 insertions, 0 deletions