All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: Moritz Fischer <mdf@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, broonie@kernel.org, atull@kernel.org
Subject: Re: [PATCH v4 3/3] fpga: Add fpga manager driver for ARRI Altera FPP
Date: Mon, 8 Apr 2019 21:01:26 +0200	[thread overview]
Message-ID: <20190408210126.74920213@crub> (raw)
In-Reply-To: <20190408180151.GA5643@archbook>

Hi Moritz,

On Mon, 8 Apr 2019 11:05:49 -0700
Moritz Fischer mdf@kernel.org wrote:

>Hi Anatolij,
>
>looks mostly good, a couple of nits inline.

Thanks for review.

...
>> +++ b/drivers/fpga/ftdi-fifo-fpp.c
>> @@ -0,0 +1,594 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Altera FPGA firmware upload via FPP using FT232H Bitbang/FT245-FIFO.
>> + *
>> + * Copyright (C) 2017 - 2018 DENX Software Engineering  
>Maybe bump that to 2019 ;-)

I'll update it in next version.

...
>> +	gpiod_set_raw_value_cansleep(priv->nconfig, 1);
>> +	gpiod_set_raw_value_cansleep(priv->conf_done, 0);
>> +	msleep(50);  
>
>You could use a constant here for the 50 ...

Do you mean something like below?

  const unsigned int wait_50ms = 50;
  ...
  msleep(wait_50ms);

...
>and here ...
>> +	gpiod_set_value_cansleep(priv->nconfig, 1);
>> +	msleep(50);  
>and here ...
>> +	gpiod_set_value_cansleep(priv->nconfig, 0);
>> +
>> +	/* Wait for CONF_DONE to get low */  
>Does the retry number come from datasheet?

No, it is an empirical value.

...
>> +	if (!retries) {
>> +		dev_warn(dev, "CONF_DONE wait timeout\n");  
>
>warn or err?

err fits better here, I'll update to dev_err().

...
>> +	struct fpp_fpga_mgr_priv *priv = mgr->priv;
>> +	struct device *dev = &priv->pdev->dev;
>> +	int retries = MAX_RETRIES;
>> +	int ret;
>> +	u8 mask, status;  
>
>Can you swap the two lines, reverse xmas-tree please.

Will do in v5.

Thanks,
Anatolij

WARNING: multiple messages have this Message-ID
From: Anatolij Gustschin <agust@denx.de>
To: Moritz Fischer <mdf@kernel.org>
Cc: linux-usb@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, broonie@kernel.org, atull@kernel.org
Subject: [v4,3/3] fpga: Add fpga manager driver for ARRI Altera FPP
Date: Mon, 8 Apr 2019 21:01:26 +0200	[thread overview]
Message-ID: <20190408210126.74920213@crub> (raw)

Hi Moritz,

On Mon, 8 Apr 2019 11:05:49 -0700
Moritz Fischer mdf@kernel.org wrote:

>Hi Anatolij,
>
>looks mostly good, a couple of nits inline.

Thanks for review.

...
>> +++ b/drivers/fpga/ftdi-fifo-fpp.c
>> @@ -0,0 +1,594 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Altera FPGA firmware upload via FPP using FT232H Bitbang/FT245-FIFO.
>> + *
>> + * Copyright (C) 2017 - 2018 DENX Software Engineering  
>Maybe bump that to 2019 ;-)

I'll update it in next version.

...
>> +	gpiod_set_raw_value_cansleep(priv->nconfig, 1);
>> +	gpiod_set_raw_value_cansleep(priv->conf_done, 0);
>> +	msleep(50);  
>
>You could use a constant here for the 50 ...

Do you mean something like below?

  const unsigned int wait_50ms = 50;
  ...
  msleep(wait_50ms);

...
>and here ...
>> +	gpiod_set_value_cansleep(priv->nconfig, 1);
>> +	msleep(50);  
>and here ...
>> +	gpiod_set_value_cansleep(priv->nconfig, 0);
>> +
>> +	/* Wait for CONF_DONE to get low */  
>Does the retry number come from datasheet?

No, it is an empirical value.

...
>> +	if (!retries) {
>> +		dev_warn(dev, "CONF_DONE wait timeout\n");  
>
>warn or err?

err fits better here, I'll update to dev_err().

...
>> +	struct fpp_fpga_mgr_priv *priv = mgr->priv;
>> +	struct device *dev = &priv->pdev->dev;
>> +	int retries = MAX_RETRIES;
>> +	int ret;
>> +	u8 mask, status;  
>
>Can you swap the two lines, reverse xmas-tree please.

Will do in v5.

Thanks,
Anatolij

  reply	other threads:[~2019-04-08 19:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-21 20:25 [PATCH v4 0/3] Add support for ARRI FPGA configuration Anatolij Gustschin
2019-02-21 20:25 ` [PATCH v4 1/3] usb: misc: add driver for FT232H based FPGA configuration devices Anatolij Gustschin
2019-02-21 20:25   ` [v4,1/3] " Anatolij Gustschin
2019-02-21 20:25 ` [PATCH v4 2/3] spi: add FTDI MPSSE SPI controller driver Anatolij Gustschin
2019-02-21 20:25   ` [v4,2/3] " Anatolij Gustschin
2019-02-21 20:25 ` [PATCH v4 3/3] fpga: Add fpga manager driver for ARRI Altera FPP Anatolij Gustschin
2019-02-21 20:25   ` [v4,3/3] " Anatolij Gustschin
2019-04-08 17:25   ` [PATCH v4 3/3] " Anatolij Gustschin
2019-04-08 17:25     ` [v4,3/3] " Anatolij Gustschin
2019-04-08 18:01   ` [PATCH v4 3/3] " Moritz Fischer
2019-04-08 18:05     ` [v4,3/3] " mdf
2019-04-08 18:05     ` [PATCH v4 3/3] " Moritz Fischer
2019-04-08 19:01     ` Anatolij Gustschin [this message]
2019-04-08 19:01       ` [v4,3/3] " Anatolij Gustschin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190408210126.74920213@crub \
    --to=agust@denx.de \
    --cc=atull@kernel.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mdf@kernel.org \
    --subject='Re: [PATCH v4 3/3] fpga: Add fpga manager driver for ARRI Altera FPP' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.