Merge git://git.denx.de/u-boot-fsl-qoriq
[oweals/u-boot.git] / drivers / gpio / atmel_pio4.c
index f3689467f01fd9a2bf25e9dc0052108c6d01b88e..30bc4296e3aa4235ac57bc659e2f14f0552ed40e 100644 (file)
@@ -50,11 +50,11 @@ static int atmel_pio4_config_io_func(u32 port, u32 pin,
        u32 reg, mask;
 
        if (pin >= ATMEL_PIO_NPINS_PER_BANK)
-               return -ENODEV;
+               return -EINVAL;
 
        port_base = atmel_pio4_port_base(port);
        if (!port_base)
-               return -ENODEV;
+               return -EINVAL;
 
        mask = 1 << pin;
        reg = func;
@@ -128,11 +128,11 @@ int atmel_pio4_set_pio_output(u32 port, u32 pin, u32 value)
        u32 reg, mask;
 
        if (pin >= ATMEL_PIO_NPINS_PER_BANK)
-               return -ENODEV;
+               return -EINVAL;
 
        port_base = atmel_pio4_port_base(port);
        if (!port_base)
-               return -ENODEV;
+               return -EINVAL;
 
        mask = 0x01 << pin;
        reg = ATMEL_PIO_CFGR_FUNC_GPIO | ATMEL_PIO_DIR_MASK;
@@ -154,11 +154,11 @@ int atmel_pio4_get_pio_input(u32 port, u32 pin)
        u32 reg, mask;
 
        if (pin >= ATMEL_PIO_NPINS_PER_BANK)
-               return -ENODEV;
+               return -EINVAL;
 
        port_base = atmel_pio4_port_base(port);
        if (!port_base)
-               return -ENODEV;
+               return -EINVAL;
 
        mask = 0x01 << pin;
        reg = ATMEL_PIO_CFGR_FUNC_GPIO;