mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation
@ 2016-09-26  9:11 Uwe Kleine-König
  2016-09-26  9:11 ` [PATCH 2/2] firmware: altera-serial: simplify handling of optional gpio Uwe Kleine-König
  2016-09-26  9:37 ` [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2016-09-26  9:11 UTC (permalink / raw)
  To: barebox

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/firmware/altera_serial.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/firmware/altera_serial.c b/drivers/firmware/altera_serial.c
index 4527d27c5c98..5486d9ec63e9 100644
--- a/drivers/firmware/altera_serial.c
+++ b/drivers/firmware/altera_serial.c
@@ -35,9 +35,9 @@
  *
  *	fpga@0 {
  *		compatible = "altr,fpga-passive-serial";
- *		nstat-gpio = <&gpio4 18 0>;
- *		confd-gpio = <&gpio4 19 0>;
- *		nconfig-gpio = <&gpio4 20 0>;
+ *		nstat-gpios = <&gpio4 18 0>;
+ *		confd-gpios = <&gpio4 19 0>;
+ *		nconfig-gpios = <&gpio4 20 0>;
  *		spi-max-frequency = <10000000>;
  *		reg = <0>;
  *	};
@@ -220,7 +220,7 @@ static int altera_spi_of(struct device_d *dev, struct fpga_spi *this)
 	const char *name;
 	int ret;
 
-	name = "nstat-gpio";
+	name = "nstat-gpios";
 	if (!of_get_property(n, name, NULL)) {
 		dev_info(dev, "nstat-gpio is not specified, assuming it is not connected\n");
 		this->nstat_gpio = -1;
@@ -232,14 +232,14 @@ static int altera_spi_of(struct device_d *dev, struct fpga_spi *this)
 		}
 	}
 
-	name = "confd-gpio";
+	name = "confd-gpios";
 	this->confd_gpio = of_get_named_gpio(n, name, 0);
 	if (this->confd_gpio < 0) {
 		ret = this->confd_gpio;
 		goto out;
 	}
 
-	name = "nconfig-gpio";
+	name = "nconfig-gpios";
 	this->nconfig_gpio = of_get_named_gpio(n, name, 0);
 	if (this->nconfig_gpio < 0) {
 		ret = this->nconfig_gpio;
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] firmware: altera-serial: simplify handling of optional gpio
  2016-09-26  9:11 [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
@ 2016-09-26  9:11 ` Uwe Kleine-König
  2016-09-26  9:37 ` [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
  1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2016-09-26  9:11 UTC (permalink / raw)
  To: barebox

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/firmware/altera_serial.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/firmware/altera_serial.c b/drivers/firmware/altera_serial.c
index 5486d9ec63e9..ddee991ed073 100644
--- a/drivers/firmware/altera_serial.c
+++ b/drivers/firmware/altera_serial.c
@@ -221,15 +221,13 @@ static int altera_spi_of(struct device_d *dev, struct fpga_spi *this)
 	int ret;
 
 	name = "nstat-gpios";
-	if (!of_get_property(n, name, NULL)) {
+	this->nstat_gpio = of_get_named_gpio(n, name, 0);
+	if (this->nstat_gpio == -ENOENT) {
 		dev_info(dev, "nstat-gpio is not specified, assuming it is not connected\n");
 		this->nstat_gpio = -1;
-	} else {
-		this->nstat_gpio = of_get_named_gpio(n, name, 0);
-		if (this->nstat_gpio < 0) {
-			ret = this->nstat_gpio;
-			goto out;
-		}
+	} else if (this->nstat_gpio < 0) {
+		ret = this->nstat_gpio;
+		goto out;
 	}
 
 	name = "confd-gpios";
-- 
2.9.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation
  2016-09-26  9:11 [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
  2016-09-26  9:11 ` [PATCH 2/2] firmware: altera-serial: simplify handling of optional gpio Uwe Kleine-König
@ 2016-09-26  9:37 ` Uwe Kleine-König
  2016-09-27  6:10   ` Sascha Hauer
  1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2016-09-26  9:37 UTC (permalink / raw)
  To: barebox

Hello Sascha

I just noticed there is an additional change needed:

diff --git a/drivers/firmware/altera_serial.c b/drivers/firmware/altera_serial.c
index ddee991ed073..b119778d720d 100644
--- a/drivers/firmware/altera_serial.c
+++ b/drivers/firmware/altera_serial.c
@@ -328,7 +328,7 @@ out:
 
 static struct of_device_id altera_spi_id_table[] = {
 	{
-		.compatible = "altr,passive-serial",
+		.compatible = "altr,fpga-passive-serial",
 	},
 };
 
Should I resend, or can you fixup yourself?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation
  2016-09-26  9:37 ` [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
@ 2016-09-27  6:10   ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2016-09-27  6:10 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Mon, Sep 26, 2016 at 11:37:29AM +0200, Uwe Kleine-König wrote:
> Hello Sascha
> 
> I just noticed there is an additional change needed:
> 
> diff --git a/drivers/firmware/altera_serial.c b/drivers/firmware/altera_serial.c
> index ddee991ed073..b119778d720d 100644
> --- a/drivers/firmware/altera_serial.c
> +++ b/drivers/firmware/altera_serial.c
> @@ -328,7 +328,7 @@ out:
>  
>  static struct of_device_id altera_spi_id_table[] = {
>  	{
> -		.compatible = "altr,passive-serial",
> +		.compatible = "altr,fpga-passive-serial",
>  	},
>  };
>  
> Should I resend, or can you fixup yourself?

Fixed while applying

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-27  6:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-26  9:11 [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
2016-09-26  9:11 ` [PATCH 2/2] firmware: altera-serial: simplify handling of optional gpio Uwe Kleine-König
2016-09-26  9:37 ` [PATCH 1/2] firmware: altera-serial: Make the driver match the dt binding documentation Uwe Kleine-König
2016-09-27  6:10   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox