|
@@ -207,7 +207,7 @@ static int altera_ps_write_complete(struct fpga_manager *mgr,
|
|
|
return -EIO;
|
|
return -EIO;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (!IS_ERR(conf->confd)) {
|
|
|
|
|
|
|
+ if (conf->confd) {
|
|
|
if (!gpiod_get_raw_value_cansleep(conf->confd)) {
|
|
if (!gpiod_get_raw_value_cansleep(conf->confd)) {
|
|
|
dev_err(&mgr->dev, "CONF_DONE is inactive!\n");
|
|
dev_err(&mgr->dev, "CONF_DONE is inactive!\n");
|
|
|
return -EIO;
|
|
return -EIO;
|
|
@@ -265,10 +265,13 @@ static int altera_ps_probe(struct spi_device *spi)
|
|
|
return PTR_ERR(conf->status);
|
|
return PTR_ERR(conf->status);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- conf->confd = devm_gpiod_get(&spi->dev, "confd", GPIOD_IN);
|
|
|
|
|
|
|
+ conf->confd = devm_gpiod_get_optional(&spi->dev, "confd", GPIOD_IN);
|
|
|
if (IS_ERR(conf->confd)) {
|
|
if (IS_ERR(conf->confd)) {
|
|
|
- dev_warn(&spi->dev, "Not using confd gpio: %ld\n",
|
|
|
|
|
- PTR_ERR(conf->confd));
|
|
|
|
|
|
|
+ dev_err(&spi->dev, "Failed to get confd gpio: %ld\n",
|
|
|
|
|
+ PTR_ERR(conf->confd));
|
|
|
|
|
+ return PTR_ERR(conf->confd);
|
|
|
|
|
+ } else if (!conf->confd) {
|
|
|
|
|
+ dev_warn(&spi->dev, "Not using confd gpio");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* Register manager with unique name */
|
|
/* Register manager with unique name */
|