/* This function implements the API that's compatible with current GPIO API used in U-Boot. The request is forwarded to particular GPIO driver. Returns 0 on success, negative value on error.  */
int gpio_direction_output(unsigned gpio, int value)
/* This function implements the API that's compatible with current GPIO API used in U-Boot. The request is forwarded to particular GPIO driver. Returns 0 on success, negative value on error.  */
int gpio_direction_output(unsigned gpio, int value)
{
	struct gpio_desc desc;
	int ret;
	ret = gpio_to_device(gpio, &desc);
	if (ret)
		return ret;
	ret = check_reserved(&desc, "dir_output");
	if (ret)
		return ret;
	return gpio_get_ops(desc.dev)->direction_output(desc.dev,
							desc.offset, value);
}