[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181128091439.GA6828@sirena.org.uk>
Date:   Wed, 28 Nov 2018 09:14:40 +0000
From:   Mark Brown <broonie@...nel.org>
To:     Anatolij Gustschin <agust@...x.de>
Cc:     linux-usb@...r.kernel.org, linux-spi@...r.kernel.org,
        linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org,
        gregkh@...uxfoundation.org, atull@...nel.org, mdf@...nel.org
Subject: Re: [PATCH v2 2/3] spi: add FTDI MPSSE SPI controller driver
On Tue, Nov 27, 2018 at 01:21:27AM +0100, Anatolij Gustschin wrote:
> Mark Brown broonie@...nel.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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists
 
