mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
pinctrl: pass name instead of device to pin_config_*
Obtaining a "struct pinctrl_dev *" is difficult for code not directly related to the pinctrl subsystem. However, the device name of the pinctrl device is fairly well known. So, modify pin_config_*() to take the device name instead of the "struct pinctrl_dev *". Signed-off-by: Stephen Warren <[email protected]> [rebased on top of refactoring code] Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
63fd5984a9
commit
43699dea1e
3 changed files with 41 additions and 18 deletions
|
|
@ -208,7 +208,7 @@ unconnected.
|
|||
|
||||
For example, a platform may do this:
|
||||
|
||||
ret = pin_config_set(dev, "FOO_GPIO_PIN", PLATFORM_X_PULL_UP);
|
||||
ret = pin_config_set("foo-dev", "FOO_GPIO_PIN", PLATFORM_X_PULL_UP);
|
||||
|
||||
To pull up a pin to VDD. The pin configuration driver implements callbacks for
|
||||
changing pin configuration in the pin controller ops like this:
|
||||
|
|
|
|||
Loading…
Reference in a new issue