]> git.sur5r.net Git - u-boot/blobdiff - drivers/spi/omap3_spi.c
power: pmic: Let PFUZE3000 see all 256 registers
[u-boot] / drivers / spi / omap3_spi.c
index 053a67bbe0f2d2a470a6916950c75f746bae8171..4169abdef673131ca31f9973253a76bf25c01b91 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2016 Jagan Teki <jteki@openedev.com>
  *                   Christophe Ricard <christophe.ricard@gmail.com>
@@ -13,8 +14,6 @@
  * Copyright (C) 2005, 2006 Nokia Corporation
  *
  * Modified by Ruslan Araslanov <ruslan.araslanov@vitecmm.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -630,8 +629,10 @@ static int omap3_spi_probe(struct udevice *dev)
                (struct omap2_mcspi_platform_config*)dev_get_driver_data(dev);
 
        priv->regs = (struct mcspi *)(devfdt_get_addr(dev) + data->regs_offset);
-       priv->pin_dir = fdtdec_get_uint(blob, node, "ti,pindir-d0-out-d1-in",
-                                           MCSPI_PINDIR_D0_IN_D1_OUT);
+       if (fdtdec_get_bool(blob, node, "ti,pindir-d0-out-d1-in"))
+               priv->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN;
+       else
+               priv->pin_dir = MCSPI_PINDIR_D0_IN_D1_OUT;
        priv->wordlen = SPI_DEFAULT_WORDLEN;
        return 0;
 }