コード例 #1
0
int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
		const char *label)
{
	size_t i;
	int ret;

	for (i = 0; i < count; ++i) {
		unsigned gpio = pin_list[i] & (GPIO_PIN_MASK | GPIO_PORT_MASK);

		ret = gpio_request(gpio, label);
		if (ret)
			goto err_gpio_request;
	}

	ret = imx_iomuxv1_setup_multiple(pin_list, count);
	if (ret)
		goto err_setup;

	return 0;

err_setup:
	BUG_ON(i != count);

err_gpio_request:
	mxc_gpio_release_multiple_pins(pin_list, i);

	return ret;
}
コード例 #2
0
ファイル: iomux-v1.c プロジェクト: CSCLOG/beaglebone
int mxc_gpio_setup_multiple_pins(const int *pin_list, unsigned count,
		const char *label)
{
	int ret;

	ret = imx_iomuxv1_setup_multiple(pin_list, count);
	return ret;
}