mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-14 21:01:29 +00:00
FPGA Manager fixes for 5.3
A single fix for the altera-ps-spi driver that fixes the behavior when the driver receives -EPROBE_DEFER when trying to obtain a GPIO desc. Signed-off-by: Moritz Fischer <mdf@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQS/ea/a56fFi9QbQeJ+E8eWOj6VqQUCXVnwggAKCRB+E8eWOj6V qZlLAQDZA+zyKkY/69BtF2oMG1ilZ0XAg5imZiPDkCUleEQjAgEApE0snS7YKc/f cRrIFy6jTAsw1S553kYoB384prnnTwg= =npyY -----END PGP SIGNATURE----- Merge tag 'fpga-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga into char-misc-linus Moritz writes: FPGA Manager fixes for 5.3 A single fix for the altera-ps-spi driver that fixes the behavior when the driver receives -EPROBE_DEFER when trying to obtain a GPIO desc. Signed-off-by: Moritz Fischer <mdf@kernel.org> * tag 'fpga-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mdf/linux-fpga: fpga: altera-ps-spi: Fix getting of optional confd gpio
This commit is contained in:
commit
c78439f8b9
@ -210,7 +210,7 @@ static int altera_ps_write_complete(struct fpga_manager *mgr,
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if (!IS_ERR(conf->confd)) {
|
||||
if (conf->confd) {
|
||||
if (!gpiod_get_raw_value_cansleep(conf->confd)) {
|
||||
dev_err(&mgr->dev, "CONF_DONE is inactive!\n");
|
||||
return -EIO;
|
||||
@ -289,10 +289,13 @@ static int altera_ps_probe(struct spi_device *spi)
|
||||
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)) {
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user