diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2018-03-22 22:55:02 +0100 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2018-03-23 23:03:29 +0530 |
commit | 63018a3eddd5d9c64f7ee42615a63c6a67ab484d (patch) | |
tree | b2ea77c84c12a63e380c13dd93bd9233fc4dbb71 /drivers | |
parent | 4b5f6c52e78d43710a0d062e31de741ec76ceea1 (diff) |
omap3: spi: Correct ti, pindir-d0-out-d1-in parsing
The ti,pindir-d0-out-d1-in property is not expected to have a value
according to the device-tree binding, so treat it as a boolean not a
uint property.
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/omap3_spi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/spi/omap3_spi.c b/drivers/spi/omap3_spi.c index 053a67bbe0..1ac691a68e 100644 --- a/drivers/spi/omap3_spi.c +++ b/drivers/spi/omap3_spi.c @@ -630,8 +630,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; } |