All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Anatolij Gustschin <agust@denx.de>
Cc: linux-usb@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, atull@kernel.org, mdf@kernel.org
Subject: Re: [PATCH v2 2/3] spi: add FTDI MPSSE SPI controller driver
Date: Wed, 28 Nov 2018 09:14:40 +0000	[thread overview]
Message-ID: <20181128091439.GA6828@sirena.org.uk> (raw)
In-Reply-To: <20181127012127.24e455b6@crub>

[-- Attachment #1: Type: text/plain, Size: 795 bytes --]

On Tue, Nov 27, 2018 at 01:21:27AM +0100, Anatolij Gustschin wrote:
> Mark Brown broonie@kernel.org wrote:

> >> +	if (max_cs > 12) {
> >> +		dev_err(dev, "Invalid max CS in platform data: %d\n", max_cs);
> >> +		return -EINVAL;
> >> +	}
> >> +	dev_dbg(dev, "CS count %d, max CS %d\n", num_cs, max_cs);
> >> +	max_cs += 1; /* including CS0 */  

> >Why not just size the array based on the platform data?

> The driver must also support multiple SPI slaves with additional control
> pins (besides SPI chip-select gpios). There are devices with not adjacent
> chip-select gpios or devices with single chip-select gpio starting at
> some offset. The array size is not always the number of chip-selects
> or the max. chip-select, e.g.:

A few unused entries really won't matter.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Anatolij Gustschin <agust@denx.de>
Cc: linux-usb@vger.kernel.org, linux-spi@vger.kernel.org,
	linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org,
	gregkh@linuxfoundation.org, atull@kernel.org, mdf@kernel.org
Subject: [v2,2/3] spi: add FTDI MPSSE SPI controller driver
Date: Wed, 28 Nov 2018 09:14:40 +0000	[thread overview]
Message-ID: <20181128091439.GA6828@sirena.org.uk> (raw)

On Tue, Nov 27, 2018 at 01:21:27AM +0100, Anatolij Gustschin wrote:
> Mark Brown broonie@kernel.org wrote:

> >> +	if (max_cs > 12) {
> >> +		dev_err(dev, "Invalid max CS in platform data: %d\n", max_cs);
> >> +		return -EINVAL;
> >> +	}
> >> +	dev_dbg(dev, "CS count %d, max CS %d\n", num_cs, max_cs);
> >> +	max_cs += 1; /* including CS0 */  

> >Why not just size the array based on the platform data?

> The driver must also support multiple SPI slaves with additional control
> pins (besides SPI chip-select gpios). There are devices with not adjacent
> chip-select gpios or devices with single chip-select gpio starting at
> some offset. The array size is not always the number of chip-selects
> or the max. chip-select, e.g.:

A few unused entries really won't matter.

  reply	other threads:[~2018-11-28  9:14 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-20  0:28 [PATCH v2 0/3] Add support for ARRI FPGA configuration Anatolij Gustschin
2018-11-20  0:28 ` [PATCH v2 1/3] usb: misc: add driver for FT232H based FPGA configuration devices Anatolij Gustschin
2018-11-20  0:28   ` [v2,1/3] " Anatolij Gustschin
2018-11-20  0:56   ` [PATCH v2 1/3] " Trent Piepho
2018-11-20  0:56     ` [v2,1/3] " Trent Piepho
2018-11-20 14:49     ` [PATCH v2 1/3] " Anatolij Gustschin
2018-11-20 14:49       ` [v2,1/3] " Anatolij Gustschin
2018-11-20  0:28 ` [PATCH v2 2/3] spi: add FTDI MPSSE SPI controller driver Anatolij Gustschin
2018-11-20  0:28   ` [v2,2/3] " Anatolij Gustschin
2018-11-21 12:42   ` [PATCH v2 2/3] " Mark Brown
2018-11-21 12:42     ` [v2,2/3] " Mark Brown
2018-11-27  0:21     ` [PATCH v2 2/3] " Anatolij Gustschin
2018-11-27  0:21       ` [v2,2/3] " Anatolij Gustschin
2018-11-28  9:14       ` Mark Brown [this message]
2018-11-28  9:14         ` Mark Brown
2018-11-20  0:28 ` [PATCH v2 3/3] fpga: Add fpga manager driver for ARRI Altera FPP Anatolij Gustschin
2018-11-20  0:28   ` [v2,3/3] " Anatolij Gustschin
  -- strict thread matches above, loose matches on Subject: below --
2018-11-05 16:19 [PATCH 2/3] spi: add FTDI MPSSE SPI controller driver Anatolij Gustschin
2018-11-09  7:53 ` [PATCH v2 " Anatolij Gustschin
2018-11-09 15:30   ` Mark Brown
2018-11-10 10:39     ` Anatolij Gustschin
2018-11-13 18:11       ` Mark Brown
2018-11-13 18:56         ` 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=20181128091439.GA6828@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=agust@denx.de \
    --cc=atull@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 \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.