Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c2c0e52 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'pinctrl-fixes-v3.10-2' of...

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
parents 78aa0b38 1dda2fa6
Loading
Loading
Loading
Loading
+14 −16
Original line number Original line Diff line number Diff line
@@ -851,22 +851,11 @@ static int abx500_gpio_probe(struct platform_device *pdev)


	if (abx500_pdata)
	if (abx500_pdata)
		pdata = abx500_pdata->gpio;
		pdata = abx500_pdata->gpio;
	if (!pdata) {
		if (np) {
			const struct of_device_id *match;


			match = of_match_device(abx500_gpio_match, &pdev->dev);
	if (!(pdata || np)) {
			if (!match)
				return -ENODEV;
			id = (unsigned long)match->data;
		} else {
		dev_err(&pdev->dev, "gpio dt and platform data missing\n");
		dev_err(&pdev->dev, "gpio dt and platform data missing\n");
		return -ENODEV;
		return -ENODEV;
	}
	}
	}

	if (platid)
		id = platid->driver_data;


	pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl),
	pct = devm_kzalloc(&pdev->dev, sizeof(struct abx500_pinctrl),
				   GFP_KERNEL);
				   GFP_KERNEL);
@@ -882,6 +871,16 @@ static int abx500_gpio_probe(struct platform_device *pdev)
	pct->chip.dev = &pdev->dev;
	pct->chip.dev = &pdev->dev;
	pct->chip.base = (np) ? -1 : pdata->gpio_base;
	pct->chip.base = (np) ? -1 : pdata->gpio_base;


	if (platid)
		id = platid->driver_data;
	else if (np) {
		const struct of_device_id *match;

		match = of_match_device(abx500_gpio_match, &pdev->dev);
		if (match)
			id = (unsigned long)match->data;
	}

	/* initialize the lock */
	/* initialize the lock */
	mutex_init(&pct->lock);
	mutex_init(&pct->lock);


@@ -900,8 +899,7 @@ static int abx500_gpio_probe(struct platform_device *pdev)
		abx500_pinctrl_ab8505_init(&pct->soc);
		abx500_pinctrl_ab8505_init(&pct->soc);
		break;
		break;
	default:
	default:
		dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n",
		dev_err(&pdev->dev, "Unsupported pinctrl sub driver (%d)\n", id);
				(int) platid->driver_data);
		mutex_destroy(&pct->lock);
		mutex_destroy(&pct->lock);
		return -EINVAL;
		return -EINVAL;
	}
	}
+2 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,8 @@ static void ltq_pinctrl_dt_free_map(struct pinctrl_dev *pctldev,
	int i;
	int i;


	for (i = 0; i < num_maps; i++)
	for (i = 0; i < num_maps; i++)
		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN)
		if (map[i].type == PIN_MAP_TYPE_CONFIGS_PIN ||
		    map[i].type == PIN_MAP_TYPE_CONFIGS_GROUP)
			kfree(map[i].data.configs.configs);
			kfree(map[i].data.configs.configs);
	kfree(map);
	kfree(map);
}
}
+2 −1
Original line number Original line Diff line number Diff line
@@ -1166,7 +1166,8 @@ static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
	(*map)->data.mux.function = np->name;
	(*map)->data.mux.function = np->name;


	if (pcs->is_pinconf) {
	if (pcs->is_pinconf) {
		if (pcs_parse_pinconf(pcs, np, function, map))
		res = pcs_parse_pinconf(pcs, np, function, map);
		if (res)
			goto free_pingroups;
			goto free_pingroups;
		*num_maps = 2;
		*num_maps = 2;
	} else {
	} else {
+1 −1
Original line number Original line Diff line number Diff line
@@ -53,7 +53,7 @@ static const struct wmt_pinctrl_bank_registers wm8750_banks[] = {
#define WMT_PIN_EXTGPIO6	WMT_PIN(0, 6)
#define WMT_PIN_EXTGPIO6	WMT_PIN(0, 6)
#define WMT_PIN_EXTGPIO7	WMT_PIN(0, 7)
#define WMT_PIN_EXTGPIO7	WMT_PIN(0, 7)
#define WMT_PIN_WAKEUP0		WMT_PIN(0, 16)
#define WMT_PIN_WAKEUP0		WMT_PIN(0, 16)
#define WMT_PIN_WAKEUP1		WMT_PIN(0, 16)
#define WMT_PIN_WAKEUP1		WMT_PIN(0, 17)
#define WMT_PIN_SD0CD		WMT_PIN(0, 28)
#define WMT_PIN_SD0CD		WMT_PIN(0, 28)
#define WMT_PIN_VDOUT0		WMT_PIN(1, 0)
#define WMT_PIN_VDOUT0		WMT_PIN(1, 0)
#define WMT_PIN_VDOUT1		WMT_PIN(1, 1)
#define WMT_PIN_VDOUT1		WMT_PIN(1, 1)
+6 −6
Original line number Original line Diff line number Diff line
@@ -37,17 +37,17 @@
 *	if it is 0, pull-down is disabled.
 *	if it is 0, pull-down is disabled.
 * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and
 * @PIN_CONFIG_DRIVE_PUSH_PULL: the pin will be driven actively high and
 *	low, this is the most typical case and is typically achieved with two
 *	low, this is the most typical case and is typically achieved with two
 *	active transistors on the output. Sending this config will enabale
 *	active transistors on the output. Setting this config will enable
 *	push-pull mode, the argument is ignored.
 *	push-pull mode, the argument is ignored.
 * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open
 * @PIN_CONFIG_DRIVE_OPEN_DRAIN: the pin will be driven with open drain (open
 *	collector) which means it is usually wired with other output ports
 *	collector) which means it is usually wired with other output ports
 *	which are then pulled up with an external resistor. Sending this
 *	which are then pulled up with an external resistor. Setting this
 *	config will enabale open drain mode, the argument is ignored.
 *	config will enable open drain mode, the argument is ignored.
 * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source
 * @PIN_CONFIG_DRIVE_OPEN_SOURCE: the pin will be driven with open source
 *	(open emitter). Sending this config will enabale open drain mode, the
 *	(open emitter). Setting this config will enable open drain mode, the
 *	argument is ignored.
 *	argument is ignored.
 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will output the current passed as
 * @PIN_CONFIG_DRIVE_STRENGTH: the pin will sink or source at most the current
 * 	argument. The argument is in mA.
 *	passed as argument. The argument is in mA.
 * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin.
 * @PIN_CONFIG_INPUT_SCHMITT_ENABLE: control schmitt-trigger mode on the pin.
 *      If the argument != 0, schmitt-trigger mode is enabled. If it's 0,
 *      If the argument != 0, schmitt-trigger mode is enabled. If it's 0,
 *      schmitt-trigger mode is disabled.
 *      schmitt-trigger mode is disabled.