[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWbqEkARvSuMxSRusCj0yi7GUYTyQouRhOi+iYJq9R-Kg@mail.gmail.com>
Date: Fri, 31 Aug 2018 13:41:06 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Yogesh Gaur <yogeshnarayan.gaur@....com>
Cc: MTD Maling List <linux-mtd@...ts.infradead.org>,
Boris Brezillon <boris.brezillon@...tlin.com>,
Marek Vasut <marek.vasut@...il.com>,
linux-spi <linux-spi@...r.kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>, Mark Rutland <mark.rutland@....com>,
Rob Herring <robh@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Frieder Schrempf <frieder.schrempf@...eet.de>,
Brian Norris <computersforpeace@...il.com>,
Shawn Guo <shawnguo@...nel.org>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 1/7] spi: add slave device size in spi_device struct
Hi Yogesh,
Thanks for your patch!
On Fri, Aug 31, 2018 at 12:33 PM Yogesh Gaur <yogeshnarayan.gaur@....com> wrote:
> Add 'size' data variable in spi_device struct.
> This is to save the size of the connected slave device.
What is the "size" of an SPI slave device?
> After slave device scan, spi_nor_scan, size being assigned to this
> from MTD layer.
Ah, this is MTD specific?
> SFDP read is being requested before completion of spi_nor_scan()
> routine, thus populate device size before making read request
> to the SPI controller.
>
> Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@....com>
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -127,6 +127,7 @@ void spi_statistics_add_transfer_stats(struct spi_statistics *stats,
> * for driver coldplugging, and in uevents used for hotplugging
> * @cs_gpio: gpio number of the chipselect line (optional, -ENOENT when
> * not using a GPIO line)
> + * @size: size of the connected slave device
Please document what is the meaning of "size".
> *
> * @statistics: statistics for the spi_device
> *
> @@ -168,6 +169,7 @@ struct spi_device {
> void *controller_data;
> char modalias[SPI_NAME_SIZE];
> int cs_gpio; /* chip select gpio */
> + u32 size; /* size of slave device */
>
> /* the statistics */
> struct spi_statistics statistics;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists