mirror of
https://xff.cz/git/u-boot/
synced 2025-09-29 22:41:17 +02:00
sysreset: gpio: fix gpio_reboot_request return value
It should return -EINPROGRESS if successful otherwise sysreset-uclass will continue to the next sysreset device. Signed-off-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Simon Glass
parent
49d8cc4cbe
commit
a47164dfc1
@@ -17,6 +17,7 @@ struct gpio_reboot_priv {
|
|||||||
static int gpio_reboot_request(struct udevice *dev, enum sysreset_t type)
|
static int gpio_reboot_request(struct udevice *dev, enum sysreset_t type)
|
||||||
{
|
{
|
||||||
struct gpio_reboot_priv *priv = dev_get_priv(dev);
|
struct gpio_reboot_priv *priv = dev_get_priv(dev);
|
||||||
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When debug log is enabled please make sure that chars won't end up
|
* When debug log is enabled please make sure that chars won't end up
|
||||||
@@ -26,7 +27,11 @@ static int gpio_reboot_request(struct udevice *dev, enum sysreset_t type)
|
|||||||
debug("GPIO reset\n");
|
debug("GPIO reset\n");
|
||||||
|
|
||||||
/* Writing 1 respects polarity (active high/low) based on gpio->flags */
|
/* Writing 1 respects polarity (active high/low) based on gpio->flags */
|
||||||
return dm_gpio_set_value(&priv->gpio, 1);
|
ret = dm_gpio_set_value(&priv->gpio, 1);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
return -EINPROGRESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sysreset_ops gpio_reboot_ops = {
|
static struct sysreset_ops gpio_reboot_ops = {
|
||||||
|
Reference in New Issue
Block a user