aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2018-02-01 23:20:04 +0100
committerMoritz Fischer <mdf@kernel.org>2018-03-28 09:36:26 -0700
commit45c5b1d989d10db08cbee0c93a38e5fc881ed506 (patch)
tree55a0832341c846a24f0c7e0364d781c4f2e8ac12
parentb0e671590bf58d8440641bb666979c950d64ae63 (diff)
downloadlinux-fpga-for-4.17.tar.gz
fpga-manager: altera-ps-spi: preserve nCONFIG statefpga-for-greg-4.17fpga-for-4.17
If the driver module is loaded when FPGA is configured, the FPGA is reset because nconfig is pulled low (low-active gpio inited with GPIOD_OUT_HIGH activates the signal which means setting its value to low). Init nconfig with GPIOD_OUT_LOW to prevent this. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Alan Tull <atull@kernel.org> Signed-off-by: Moritz Fischer <mdf@kernel.org>
-rw-r--r--drivers/fpga/altera-ps-spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/fpga/altera-ps-spi.c b/drivers/fpga/altera-ps-spi.c
index b061408bf0ae2..250d9cf9bb1bd 100644
--- a/drivers/fpga/altera-ps-spi.c
+++ b/drivers/fpga/altera-ps-spi.c
@@ -254,7 +254,7 @@ static int altera_ps_probe(struct spi_device *spi)
conf->data = of_id->data;
conf->spi = spi;
- conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_HIGH);
+ conf->config = devm_gpiod_get(&spi->dev, "nconfig", GPIOD_OUT_LOW);
if (IS_ERR(conf->config)) {
dev_err(&spi->dev, "Failed to get config gpio: %ld\n",
PTR_ERR(conf->config));