]> git.sur5r.net Git - u-boot/blobdiff - drivers/power/pmic/as3722_gpio.c
mtd: nand: mxs_nand: use structure for BCH geometry
[u-boot] / drivers / power / pmic / as3722_gpio.c
index d0b681ca4ab939559077458639ac239c5d186421..36f4fbfa4704fafe35e75352aed70fef6d429349 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2014 NVIDIA Corporation
- *
- * SPDX-License-Identifier: GPL-2.0+
  */
 
 #include <common.h>
@@ -26,7 +25,7 @@ int as3722_gpio_configure(struct udevice *pmic, unsigned int gpio,
 
        err = pmic_reg_write(pmic, AS3722_GPIO_CONTROL(gpio), value);
        if (err) {
-               error("failed to configure GPIO#%u: %d", gpio, err);
+               pr_err("failed to configure GPIO#%u: %d", gpio, err);
                return err;
        }
 
@@ -46,7 +45,7 @@ static int as3722_gpio_set_value(struct udevice *dev, unsigned int gpio,
 
        err = pmic_reg_read(pmic, AS3722_GPIO_SIGNAL_OUT);
        if (err < 0) {
-               error("failed to read GPIO signal out register: %d", err);
+               pr_err("failed to read GPIO signal out register: %d", err);
                return err;
        }
        value = err;
@@ -61,7 +60,7 @@ static int as3722_gpio_set_value(struct udevice *dev, unsigned int gpio,
 
        err = pmic_reg_write(pmic, AS3722_GPIO_SIGNAL_OUT, value);
        if (err) {
-               error("failed to set GPIO#%u %s: %d", gpio, l, err);
+               pr_err("failed to set GPIO#%u %s: %d", gpio, l, err);
                return err;
        }
 
@@ -84,13 +83,13 @@ int as3722_gpio_direction_output(struct udevice *dev, unsigned int gpio,
 
        err = pmic_reg_write(pmic, AS3722_GPIO_CONTROL(gpio), value);
        if (err) {
-               error("failed to configure GPIO#%u as output: %d", gpio, err);
+               pr_err("failed to configure GPIO#%u as output: %d", gpio, err);
                return err;
        }
 
        err = as3722_gpio_set_value(pmic, gpio, value);
        if (err < 0) {
-               error("failed to set GPIO#%u high: %d", gpio, err);
+               pr_err("failed to set GPIO#%u high: %d", gpio, err);
                return err;
        }