diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-12-09 18:59:05 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-01-03 03:10:06 -0500 |
commit | 51cd24ee625c348654114032499914d0311e5832 (patch) | |
tree | 7483fbdc4db119f9a8f013035005f374e729ffd0 /drivers/pinctrl/pinconf.c | |
parent | 528b78306ecf82af06c4862aa5518643fe20a440 (diff) |
pinctrl: don't create a device for each pin controller
Pin controllers should already be instantiated as a device, so there's
no need for the pinctrl core to create a new struct device for each
controller.
This allows the controller's real name to be used in the mux mapping
table, rather than e.g. "pinctrl.0", "pinctrl.1", etc.
This necessitates removal of the PINMUX_MAP_PRIMARY*() macros, since
their sole purpose was to hard-code the .ctrl_dev_name field to be
"pinctrl.0".
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf.c')
-rw-r--r-- | drivers/pinctrl/pinconf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c index 9195eefe258a..124762b57024 100644 --- a/drivers/pinctrl/pinconf.c +++ b/drivers/pinctrl/pinconf.c | |||
@@ -29,7 +29,7 @@ int pin_config_get_for_pin(struct pinctrl_dev *pctldev, unsigned pin, | |||
29 | const struct pinconf_ops *ops = pctldev->desc->confops; | 29 | const struct pinconf_ops *ops = pctldev->desc->confops; |
30 | 30 | ||
31 | if (!ops || !ops->pin_config_get) { | 31 | if (!ops || !ops->pin_config_get) { |
32 | dev_err(&pctldev->dev, "cannot get pin configuration, missing " | 32 | dev_err(pctldev->dev, "cannot get pin configuration, missing " |
33 | "pin_config_get() function in driver\n"); | 33 | "pin_config_get() function in driver\n"); |
34 | return -EINVAL; | 34 | return -EINVAL; |
35 | } | 35 | } |
@@ -65,14 +65,14 @@ int pin_config_set_for_pin(struct pinctrl_dev *pctldev, unsigned pin, | |||
65 | int ret; | 65 | int ret; |
66 | 66 | ||
67 | if (!ops || !ops->pin_config_set) { | 67 | if (!ops || !ops->pin_config_set) { |
68 | dev_err(&pctldev->dev, "cannot configure pin, missing " | 68 | dev_err(pctldev->dev, "cannot configure pin, missing " |
69 | "config function in driver\n"); | 69 | "config function in driver\n"); |
70 | return -EINVAL; | 70 | return -EINVAL; |
71 | } | 71 | } |
72 | 72 | ||
73 | ret = ops->pin_config_set(pctldev, pin, config); | 73 | ret = ops->pin_config_set(pctldev, pin, config); |
74 | if (ret) { | 74 | if (ret) { |
75 | dev_err(&pctldev->dev, | 75 | dev_err(pctldev->dev, |
76 | "unable to set pin configuration on pin %d\n", pin); | 76 | "unable to set pin configuration on pin %d\n", pin); |
77 | return ret; | 77 | return ret; |
78 | } | 78 | } |
@@ -108,7 +108,7 @@ int pin_config_group_get(struct pinctrl_dev *pctldev, const char *pin_group, | |||
108 | int selector; | 108 | int selector; |
109 | 109 | ||
110 | if (!ops || !ops->pin_config_group_get) { | 110 | if (!ops || !ops->pin_config_group_get) { |
111 | dev_err(&pctldev->dev, "cannot get configuration for pin " | 111 | dev_err(pctldev->dev, "cannot get configuration for pin " |
112 | "group, missing group config get function in " | 112 | "group, missing group config get function in " |
113 | "driver\n"); | 113 | "driver\n"); |
114 | return -EINVAL; | 114 | return -EINVAL; |
@@ -135,7 +135,7 @@ int pin_config_group_set(struct pinctrl_dev *pctldev, const char *pin_group, | |||
135 | int i; | 135 | int i; |
136 | 136 | ||
137 | if (!ops || (!ops->pin_config_group_set && !ops->pin_config_set)) { | 137 | if (!ops || (!ops->pin_config_group_set && !ops->pin_config_set)) { |
138 | dev_err(&pctldev->dev, "cannot configure pin group, missing " | 138 | dev_err(pctldev->dev, "cannot configure pin group, missing " |
139 | "config function in driver\n"); | 139 | "config function in driver\n"); |
140 | return -EINVAL; | 140 | return -EINVAL; |
141 | } | 141 | } |
@@ -146,7 +146,7 @@ int pin_config_group_set(struct pinctrl_dev *pctldev, const char *pin_group, | |||
146 | 146 | ||
147 | ret = pctlops->get_group_pins(pctldev, selector, &pins, &num_pins); | 147 | ret = pctlops->get_group_pins(pctldev, selector, &pins, &num_pins); |
148 | if (ret) { | 148 | if (ret) { |
149 | dev_err(&pctldev->dev, "cannot configure pin group, error " | 149 | dev_err(pctldev->dev, "cannot configure pin group, error " |
150 | "getting pins\n"); | 150 | "getting pins\n"); |
151 | return ret; | 151 | return ret; |
152 | } | 152 | } |