Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361813

Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure.

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure.
Date 2016-03-21 14:10 +0100
Message-ID <rf7KO-67l-13@gated-at.bofh.it> (permalink)
References <rf7hM-5EJ-39@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, Mar 21, 2016 at 05:50:08PM +0530, P L Sai Krishna wrote:
> This patch does following things.
> 1. Added dummy entry in the spi_transfer structure.
> 2. Assigned dummy cycles to dummy member in the transfer
> structure during read operation.

Please try to follow the patch submission process covered in
SubmittingPatches, in particular please use subject lines reflecting the
style for the subsystem (which helps people identify relevant changes to
review) and...

>  drivers/mtd/devices/m25p80.c | 1 +
>  include/linux/spi/spi.h      | 2 ++
>  2 files changed, 3 insertions(+)

...split things up into individual patches, for example here you're
both adding a new feature and adding a user of that feature in a single
patch.

> + * @dummy: number of dummy cycles.

This needs to be clearer about what a dummy cycle is and where it gets
inserted.  We probably also want a better name, just "dummy" makes it
look like a padding field in the structure.  How about dummy_cycles?

> @@ -752,6 +753,7 @@ struct spi_transfer {
>  	u8		bits_per_word;
>  	u16		delay_usecs;
>  	u32		speed_hz;
> +	u32		dummy;
>  
>  	struct list_head transfer_list;
>  };

This isn't enough to add the feature - a client driver trying to make
use of this needs to be able to tell if the cycles are actually going to
be inserted.  I'd expect to see a capability flag that can be checked
and some error checking so that if we try to do a transfer with dummy
cycles and can't support it we don't silently ignore the dummy cycles,
ideally also something that'll handle multiples of 8 bits with SPI
controllers that don't otherwise support this feature.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-21 13:40 +0100
  [LINUX PATCH 2/2] spi:zynqmp:gqspi: Added separate dummy entry. P L Sai Krishna <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-21 14:00 +0100
  Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Mark Brown <broonie@kernel.org> - 2016-03-21 14:10 +0100
    RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-22 07:50 +0100
      Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Mark Brown <broonie@kernel.org> - 2016-03-22 11:10 +0100
        RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-25 15:00 +0100
          Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Mark Brown <broonie@kernel.org> - 2016-03-25 16:10 +0100
            RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-31 08:50 +0200
              Re: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer structure. Geert Uytterhoeven <geert@linux-m68k.org> - 2016-03-31 10:30 +0200
                RE: [LINUX PATCH 1/2] mtd: Added dummy entry in the spi_transfer  structure. Lakshmi Sai Krishna Potthuri   <lakshmi.sai.krishna.potthuri@xilinx.com> - 2016-03-31 13:20 +0200

csiph-web