2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-24 14:45:12 +08:00
linux-next/include/linux/pinctrl
Stephen Warren 6e5e959dde pinctrl: API changes to support multiple states per device
The API model is changed from:

p = pinctrl_get(dev, "state1");
pinctrl_enable(p);
...
pinctrl_disable(p);
pinctrl_put(p);
p = pinctrl_get(dev, "state2");
pinctrl_enable(p);
...
pinctrl_disable(p);
pinctrl_put(p);

to this:

p = pinctrl_get(dev);
s1 = pinctrl_lookup_state(p, "state1");
s2 = pinctrl_lookup_state(p, "state2");
pinctrl_select_state(p, s1);
...
pinctrl_select_state(p, s2);
...
pinctrl_put(p);

This allows devices to directly transition between states without
disabling the pin controller programming and put()/get()ing the
configuration data each time. This model will also better suit pinconf
programming, which doesn't have a concept of "disable".

The special-case hogging feature of pin controllers is re-written to use
the regular APIs instead of special-case code. Hence, the pinmux-hogs
debugfs file is removed; see the top-level pinctrl-handles files for
equivalent data.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2012-03-05 11:22:59 +01:00
..
consumer.h pinctrl: API changes to support multiple states per device 2012-03-05 11:22:59 +01:00
machine.h pinctrl: API changes to support multiple states per device 2012-03-05 11:22:59 +01:00
pinconf.h pinctrl: break out a pinctrl consumer header 2012-02-10 21:32:57 +01:00
pinctrl.h pinctrl: fix and simplify locking 2012-03-05 11:19:49 +01:00
pinmux.h pinctrl: break out a pinctrl consumer header 2012-02-10 21:32:57 +01:00