diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-20 10:59:46 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-20 10:59:46 -0400 |
| commit | 2c2c0e52314ef812a2aa9f7d32b3162584bee92b (patch) | |
| tree | 24a06b64246fc96d837cb08109ce49594efa8c98 | |
| parent | 78aa0b3899297039259f645f107ea8b401eecf1e (diff) | |
| parent | 1dda2fa650da12a644c7cc8645707c912bdc5ab8 (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
| -rw-r--r-- | drivers/pinctrl/pinctrl-abx500.c | 30 | ||||
| -rw-r--r-- | drivers/pinctrl/pinctrl-lantiq.c | 3 | ||||
| -rw-r--r-- | drivers/pinctrl/pinctrl-single.c | 3 | ||||
| -rw-r--r-- | drivers/pinctrl/vt8500/pinctrl-wm8750.c | 2 | ||||
| -rw-r--r-- | include/linux/pinctrl/pinconf-generic.h | 12 |
5 files changed, 25 insertions, 25 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) |
diff --git a/include/linux/pinctrl/pinconf-generic.h b/include/linux/pinctrl/pinconf-generic.h index 72474e18f1e0..6aa238096622 100644 --- a/include/linux/pinctrl/pinconf-generic.h +++ b/include/linux/pinctrl/pinconf-generic.h | |||
| @@ -37,17 +37,17 @@ | |||
| 37 | * if it is 0, pull-down is disabled. | 37 | * if it is 0, pull-down is disabled. |
| 38 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and | 38 | * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and |
| 39 | * low, this is the most typical case and is typically achieved with two | 39 | * low, this is the most typical case and is typically achieved with two |
| 40 | * active transistors on the output. Sending this config will enabale | 40 | * active transistors on the output. Setting this config will enable |
| 41 | * push-pull mode, the argument is ignored. | 41 | * push-pull mode, the argument is ignored. |
| 42 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open | 42 | * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open |
| 43 | * collector) which means it is usually wired with other output ports | 43 | * collector) which means it is usually wired with other output ports |
| 44 | * which are then pulled up with an external resistor. Sending this | 44 | * which are then pulled up with an external resistor. Setting this |
| 45 | * config will enabale open drain mode, the argument is ignored. | 45 | * config will enable open drain mode, the argument is ignored. |
| 46 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source | 46 | * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source |
| 47 | * (open emitter). Sending this config will enabale open drain mode, the | 47 | * (open emitter). Setting this config will enable open drain mode, the |
| 48 | * argument is ignored. | 48 | * argument is ignored. |
| 49 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will output the current passed as | 49 | * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current |
| 50 | * argument. The argument is in mA. | 50 | * passed as argument. The argument is in mA. |
| 51 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. | 51 | * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. |
| 52 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, | 52 | * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, |
| 53 | * schmitt-trigger mode is disabled. | 53 | * schmitt-trigger mode is disabled. |
