From: Tudor Ambarus <tudor.ambarus@linaro.org>
To: Erez Geva <erezgeva@nwtime.org>,
linux-mtd@lists.infradead.org,
Pratyush Yadav <pratyush@kernel.org>,
Michael Walle <mwalle@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
devicetree@vger.kernel.org, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Erez Geva <ErezGeva2@gmail.com>
Subject: Re: [PATCH 1/4] Add generic functions for accessing the SPI-NOR chip.
Date: Fri, 28 Jun 2024 15:39:51 +0100 [thread overview]
Message-ID: <aa4df0e5-bbd4-46f7-8e58-b42a8c909327@linaro.org> (raw)
In-Reply-To: <20240628140328.279792-2-erezgeva@nwtime.org>
Hi, Erez,
On 6/28/24 3:03 PM, Erez Geva wrote:
> From: Erez Geva <ErezGeva2@gmail.com>
>
> Functions:
>
> - Send a opcode
>
> - Read a register
>
> - Write a register
>
Please describe your changes. You may want to re-read:
https://www.kernel.org/doc/html/latest/process/submitting-patches.html#submitting-patches-the-essential-guide-to-getting-your-code-into-the-kernel
> Signed-off-by: Erez Geva <ErezGeva2@gmail.com>
> ---
> drivers/mtd/spi-nor/core.c | 130 +++++++++++++++++++++++++++----------
> drivers/mtd/spi-nor/core.h | 27 +-------
> 2 files changed, 99 insertions(+), 58 deletions(-)
>
> diff --git a/drivers/mtd/spi-nor/core.c b/drivers/mtd/spi-nor/core.c
> index 028514c6996f..0f267da339a4 100644
> --- a/drivers/mtd/spi-nor/core.c
> +++ b/drivers/mtd/spi-nor/core.c
> @@ -354,53 +354,134 @@ int spi_nor_write_any_volatile_reg(struct spi_nor *nor, struct spi_mem_op *op,
> }
>
> /**
> - * spi_nor_write_enable() - Set write enable latch with Write Enable command.
> + * _nor_send_cmd() - Send instruction without address or data to the chip.
> * @nor: pointer to 'struct spi_nor'.
> + * @opcode: Command to send
> *
> * Return: 0 on success, -errno otherwise.
> */
> -int spi_nor_write_enable(struct spi_nor *nor)
> +static inline int _nor_send_cmd(struct spi_nor *nor, u8 opcode)
and my review stops here. Why did you think it is good to introduce a
_nor* method and not an spi_nor* one?
I'm not going to review the rest of the patches. Please send a v2 that
convinces me to spend more than 2 minutes on it.
Cheers,
ta
next prev parent reply other threads:[~2024-06-28 14:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 14:03 [PATCH 0/4] Add support for SPI-NOR Macronix OTP Erez Geva
2024-06-28 14:03 ` [PATCH 1/4] Add generic functions for accessing the SPI-NOR chip Erez Geva
2024-06-28 14:39 ` Tudor Ambarus [this message]
2024-06-28 14:03 ` [PATCH 2/4] Add support for SPI-NOR Macronix OTP Erez Geva
2024-06-28 14:03 ` [PATCH 3/4] dt-bindings: mtd: macronix,mx25l12833f: add SPI-NOR chip Erez Geva
2024-06-28 15:57 ` Conor Dooley
2024-06-28 16:04 ` Michael Walle
[not found] ` <CANeKEMMrXK=mw=n=9DuTnprkTs3ct446oaC2QTJyst8Nd+D6rw@mail.gmail.com>
2024-06-28 16:44 ` Erez
2024-06-28 16:51 ` Michael Walle
2024-06-28 17:17 ` Erez
2024-06-28 17:45 ` Michael Walle
2024-06-28 19:31 ` Erez
2024-06-28 14:03 ` [PATCH 4/4] Add Macronix SPI-NOR mx25l12833f with OTP Erez Geva
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=aa4df0e5-bbd4-46f7-8e58-b42a8c909327@linaro.org \
--to=tudor.ambarus@linaro.org \
--cc=ErezGeva2@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=erezgeva@nwtime.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=mwalle@kernel.org \
--cc=pratyush@kernel.org \
--cc=richard@nod.at \
--cc=robh@kernel.org \
--cc=vigneshr@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).