/* 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 the value of the GPIO pin, or negative value on error.  */
int gpio_get_value(unsigned gpio)
/* 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 the value of the GPIO pin, or negative value on error.  */
int gpio_get_value(unsigned gpio)
{
	int ret;
	struct gpio_desc desc;
	ret = gpio_to_device(gpio, &desc);
	if (ret)
		return ret;
	return dm_gpio_get_value(&desc);
}