aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-05-20 10:59:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-20 10:59:46 -0400
commit2c2c0e52314ef812a2aa9f7d32b3162584bee92b (patch)
tree24a06b64246fc96d837cb08109ce49594efa8c98 /drivers/pinctrl
parent78aa0b3899297039259f645f107ea8b401eecf1e (diff)
parent1dda2fa650da12a644c7cc8645707c912bdc5ab8 (diff)
Merge tag 'pinctrl-fixes-v3.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pinctrl fixes from Linus Walleij: - Three fixes to make the boot path for device tree work properly on the Nomadik pin controller. - Compile warning fix for the vt8500 driver. - Fix error path in pinctrl-single. - Free mappings in error path of the Lantiq controller. - Documentation fixes. * tag 'pinctrl-fixes-v3.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl/lantiq: Free mapping configs for both pin and groups pinctrl: single: fix error return code in pcs_parse_one_pinctrl_entry() pinctrl: generic: Fix typos and clarify comments pinctrl: vt8500: Fix incorrect data in WM8750 pinctrl table pinctrl: abx500: Rejiggle platform data and DT initialisation pinctrl: abx500: Specify failed sub-driver by ID instead of driver_data
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-abx500.c30
-rw-r--r--drivers/pinctrl/pinctrl-lantiq.c3
-rw-r--r--drivers/pinctrl/pinctrl-single.c3
-rw-r--r--drivers/pinctrl/vt8500/pinctrl-wm8750.c2
4 files changed, 19 insertions, 19 deletions
diff --git a/drivers/pinctrl/pinctrl-abx500.c b/drivers/pinctrl/pinctrl-abx500.c
index aa17f7580f61..6d4532702f80 100644
--- a/drivers/pinctrl/pinctrl-abx500.c
+++ b/drivers/pinctrl/pinctrl-abx500.c
@@ -851,23 +851,12 @@ static int abx500_gpio_probe(struct platform_device *pdev)
851 851
852 if (abx500_pdata) 852 if (abx500_pdata)
853 pdata = abx500_pdata->gpio; 853 pdata = abx500_pdata->gpio;
854 if (!pdata) {
855 if (np) {
856 const struct of_device_id *match;
857 854
858 match = of_match_device(abx500_gpio_match, &pdev->dev); 855 if (!(pdata || np)) {
859 if (!match) 856 dev_err(&pdev->dev, "gpio dt and platform data missing\n");
860 return -ENODEV; 857 return -ENODEV;
861 id = (unsigned long)match->data;
862 } else {
863 dev_err(&pdev->dev, "gpio dt and platform data missing\n");
864 return -ENODEV;
865 }
866 } 858 }
867 859
868 if (platid)
869 id = platid->driver_data;
870
871 pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl), 860 pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl),
872 GFP_KERNEL); 861 GFP_KERNEL);
873 if (pct == NULL) { 862 if (pct == NULL) {
@@ -882,6 +871,16 @@ static int abx500_gpio_probe(struct platform_device *pdev)
882 pct->chip.dev = &pdev->dev; 871 pct->chip.dev = &pdev->dev;
883 pct->chip.base = (np) ? -1 : pdata->gpio_base; 872 pct->chip.base = (np) ? -1 : pdata->gpio_base;
884 873
874 if (platid)
875 id = platid->driver_data;
876 else if (np) {
877 const struct of_device_id *match;
878
879 match = of_match_device(abx500_gpio_match, &pdev->dev);
880 if (match)
881 id = (unsigned long)match->data;
882 }
883
885 /* initialize the lock */ 884 /* initialize the lock */
886 mutex_init(&pct->lock); 885 mutex_init(&pct->lock);
887 886
@@ -900,8 +899,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
900 abx500_pinctrl_ab8505_init(&pct->soc); 899 abx500_pinctrl_ab8505_init(&pct->soc);
901 break; 900 break;
902 default: 901 default:
903 dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", 902 dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id);
904 (int) platid->driver_data);
905 mutex_destroy(&pct->lock); 903 mutex_destroy(&pct->lock);
906 return -EINVAL; 904 return -EINVAL;
907 } 905 }
diff --git a/drivers/pinctrl/pinctrl-lantiq.c b/drivers/pinctrl/pinctrl-lantiq.c
index 615c5002b757..d22ca252b80d 100644
--- a/drivers/pinctrl/pinctrl-lantiq.c
+++ b/drivers/pinctrl/pinctrl-lantiq.c
@@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
52 int i; 52 int i;
53 53
54 for (i = 0; i < num_maps; i++) 54 for (i = 0; i < num_maps; i++)
55 if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN) 55 if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN ||
56 map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP)
56 kfree(map[i].data.configs.configs); 57 kfree(map[i].data.configs.configs);
57 kfree(map); 58 kfree(map);
58} 59}
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 5f2d2bfd356e..b9fa04618601 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1166,7 +1166,8 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
1166 (*map)->data.mux.function = np->name; 1166 (*map)->data.mux.function = np->name;
1167 1167
1168 if (pcs->is_pinconf) { 1168 if (pcs->is_pinconf) {
1169 if (pcs_parse_pinconf(pcs, np, function, map)) 1169 res = pcs_parse_pinconf(pcs, np, function, map);
1170 if (res)
1170 goto free_pingroups; 1171 goto free_pingroups;
1171 *num_maps = 2; 1172 *num_maps = 2;
1172 } else { 1173 } else {
diff --git a/drivers/pinctrl/vt8500/pinctrl-wm8750.c b/drivers/pinctrl/vt8500/pinctrl-wm8750.c
index b964cc550568..de43262398db 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wm8750.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wm8750.c
@@ -53,7 +53,7 @@ static const struct wmt_pinctrl_bank_registers wm8750_banks[] = {
53#define WMT_PIN_EXTGPIO6 WMT_PIN(0, 6) 53#define WMT_PIN_EXTGPIO6 WMT_PIN(0, 6)
54#define WMT_PIN_EXTGPIO7 WMT_PIN(0, 7) 54#define WMT_PIN_EXTGPIO7 WMT_PIN(0, 7)
55#define WMT_PIN_WAKEUP0 WMT_PIN(0, 16) 55#define WMT_PIN_WAKEUP0 WMT_PIN(0, 16)
56#define WMT_PIN_WAKEUP1 WMT_PIN(0, 16) 56#define WMT_PIN_WAKEUP1 WMT_PIN(0, 17)
57#define WMT_PIN_SD0CD WMT_PIN(0, 28) 57#define WMT_PIN_SD0CD WMT_PIN(0, 28)
58#define WMT_PIN_VDOUT0 WMT_PIN(1, 0) 58#define WMT_PIN_VDOUT0 WMT_PIN(1, 0)
59#define WMT_PIN_VDOUT1 WMT_PIN(1, 1) 59#define WMT_PIN_VDOUT1 WMT_PIN(1, 1)