Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+25 -25
+14 -16
drivers/pinctrl/pinctrl-abx500.c
··· 851 851 852 852 if (abx500_pdata) 853 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); 859 - if (!match) 860 - 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 - } 855 + if (!(pdata || np)) { 856 + dev_err(&pdev->dev, "gpio dt and platform data missing\n"); 857 + return -ENODEV; 866 858 } 867 - 868 - if (platid) 869 - id = platid->driver_data; 870 859 871 860 pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl), 872 861 GFP_KERNEL); ··· 870 881 pct->chip = abx500gpio_chip; 871 882 pct->chip.dev = &pdev->dev; 872 883 pct->chip.base = (np) ? -1 : pdata->gpio_base; 884 + 885 + if (platid) 886 + id = platid->driver_data; 887 + else if (np) { 888 + const struct of_device_id *match; 889 + 890 + match = of_match_device(abx500_gpio_match, &pdev->dev); 891 + if (match) 892 + id = (unsigned long)match->data; 893 + } 873 894 874 895 /* initialize the lock */ 875 896 mutex_init(&pct->lock); ··· 899 900 abx500_pinctrl_ab8505_init(&pct->soc); 900 901 break; 901 902 default: 902 - dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", 903 - (int) platid->driver_data); 903 + dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id); 904 904 mutex_destroy(&pct->lock); 905 905 return -EINVAL; 906 906 }
+2 -1
drivers/pinctrl/pinctrl-lantiq.c
··· 52 52 int i; 53 53 54 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 57 kfree(map[i].data.configs.configs); 57 58 kfree(map); 58 59 }
+2 -1
drivers/pinctrl/pinctrl-single.c
··· 1166 1166 (*map)->data.mux.function = np->name; 1167 1167 1168 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 1171 goto free_pingroups; 1171 1172 *num_maps = 2; 1172 1173 } else {
+1 -1
drivers/pinctrl/vt8500/pinctrl-wm8750.c
··· 53 53 #define WMT_PIN_EXTGPIO6 WMT_PIN(0, 6) 54 54 #define WMT_PIN_EXTGPIO7 WMT_PIN(0, 7) 55 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 57 #define WMT_PIN_SD0CD WMT_PIN(0, 28) 58 58 #define WMT_PIN_VDOUT0 WMT_PIN(1, 0) 59 59 #define WMT_PIN_VDOUT1 WMT_PIN(1, 1)
+6 -6
include/linux/pinctrl/pinconf-generic.h
··· 37 37 * if it is 0, pull-down is disabled. 38 38 * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and 39 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 41 * push-pull mode, the argument is ignored. 42 42 * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open 43 43 * collector) which means it is usually wired with other output ports 44 - * which are then pulled up with an external resistor. Sending this 45 - * config will enabale open drain mode, the argument is ignored. 44 + * which are then pulled up with an external resistor. Setting this 45 + * config will enable open drain mode, the argument is ignored. 46 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 48 * argument is ignored. 49 - * @PIN_CONFIG_DRIVE_STRENGTH: the pin will output the current passed as 50 - * argument. The argument is in mA. 49 + * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current 50 + * passed as argument. The argument is in mA. 51 51 * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin. 52 52 * If the argument != 0, schmitt-trigger mode is enabled. If it's 0, 53 53 * schmitt-trigger mode is disabled.