All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Martin Kurbanov <mmkurbanov@salutedevices.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-mtd@lists.infradead.org>,
	<kernel@salutedevices.com>, Richard Weinberger <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Michael Walle <michael@walle.cc>,
	"Mark Brown" <broonie@kernel.org>,
	Chia-Lin Kao <acelan.kao@canonical.com>,
	"Md Sadre Alam" <quic_mdalam@quicinc.com>,
	Ezra Buehler <ezra.buehler@husqvarnagroup.com>,
	Sridharan S N <quic_sridsn@quicinc.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Alexey Romanov <avromanov@salutedevices.com>
Subject: Re: [PATCH v2 2/5] mtd: spinand: add OTP support
Date: Mon, 2 Sep 2024 16:18:44 +0200	[thread overview]
Message-ID: <20240902161844.2bf982ef@xps-13> (raw)
In-Reply-To: <bb137aef-4ca9-4825-99b7-12f7e17c9550@salutedevices.com>

Hi Martin,

mmkurbanov@salutedevices.com wrote on Tue, 27 Aug 2024 20:57:04 +0300:

> Hello, Miquel. Thank you for the review.
> Regarding your question ( https://lore.kernel.org/all/20240717103623.6d6b63be@xps-13/ ):
> 
> >> +int spinand_otp_read(struct spinand_device *spinand, loff_t from, size_t len,
> >> +		     u8 *buf, size_t *retlen);
> >> +
> >> +int spinand_otp_write(struct spinand_device *spinand, loff_t from, size_t len,
> >> +		      const u8 *buf, size_t *retlen);
> >> +  
> > 
> > Why exposing spinand_otp_read and spinand_otp_write ?  
> 
> For the SPI-NAND chips we have (Micron, ESMT, FORESEE), the command
> sequence for reading/writing OTP is the same. I decided to make these
> functions global because other chips probably have similar read/write
> OTP operations as well.

Of course, I understand you might need them, but then the change does
not belong to this patch. Actually you've done that correctly for the
spinand_wait() helper.

You can do all the "make foo() global" operations in a single patch if
you want.

I will soon review more in deep the content of this patchset again.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Martin Kurbanov <mmkurbanov@salutedevices.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-mtd@lists.infradead.org>,
	<kernel@salutedevices.com>, Richard Weinberger <richard@nod.at>,
	"Vignesh Raghavendra" <vigneshr@ti.com>,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Michael Walle <michael@walle.cc>,
	"Mark Brown" <broonie@kernel.org>,
	Chia-Lin Kao <acelan.kao@canonical.com>,
	"Md Sadre Alam" <quic_mdalam@quicinc.com>,
	Ezra Buehler <ezra.buehler@husqvarnagroup.com>,
	Sridharan S N <quic_sridsn@quicinc.com>,
	Frieder Schrempf <frieder.schrempf@kontron.de>,
	Alexey Romanov <avromanov@salutedevices.com>
Subject: Re: [PATCH v2 2/5] mtd: spinand: add OTP support
Date: Mon, 2 Sep 2024 16:18:44 +0200	[thread overview]
Message-ID: <20240902161844.2bf982ef@xps-13> (raw)
In-Reply-To: <bb137aef-4ca9-4825-99b7-12f7e17c9550@salutedevices.com>

Hi Martin,

mmkurbanov@salutedevices.com wrote on Tue, 27 Aug 2024 20:57:04 +0300:

> Hello, Miquel. Thank you for the review.
> Regarding your question ( https://lore.kernel.org/all/20240717103623.6d6b63be@xps-13/ ):
> 
> >> +int spinand_otp_read(struct spinand_device *spinand, loff_t from, size_t len,
> >> +		     u8 *buf, size_t *retlen);
> >> +
> >> +int spinand_otp_write(struct spinand_device *spinand, loff_t from, size_t len,
> >> +		      const u8 *buf, size_t *retlen);
> >> +  
> > 
> > Why exposing spinand_otp_read and spinand_otp_write ?  
> 
> For the SPI-NAND chips we have (Micron, ESMT, FORESEE), the command
> sequence for reading/writing OTP is the same. I decided to make these
> functions global because other chips probably have similar read/write
> OTP operations as well.

Of course, I understand you might need them, but then the change does
not belong to this patch. Actually you've done that correctly for the
spinand_wait() helper.

You can do all the "make foo() global" operations in a single patch if
you want.

I will soon review more in deep the content of this patchset again.

Thanks,
Miquèl

  reply	other threads:[~2024-09-02 14:19 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 17:48 [PATCH v2 0/5] mtd: spinand: add OTP support Martin Kurbanov
2024-08-27 17:48 ` Martin Kurbanov
2024-08-27 17:48 ` [PATCH v2 1/5] mtd: spinand: make spinand_{read,write}_page global Martin Kurbanov
2024-08-27 17:48   ` Martin Kurbanov
2024-10-01  9:12   ` Miquel Raynal
2024-10-01  9:12     ` Miquel Raynal
2024-08-27 17:49 ` [PATCH v2 2/5] mtd: spinand: add OTP support Martin Kurbanov
2024-08-27 17:49   ` Martin Kurbanov
2024-08-27 17:57   ` Martin Kurbanov
2024-08-27 17:57     ` Martin Kurbanov
2024-09-02 14:18     ` Miquel Raynal [this message]
2024-09-02 14:18       ` Miquel Raynal
2024-10-01  9:12   ` Miquel Raynal
2024-10-01  9:12     ` Miquel Raynal
2024-10-14 12:27     ` Martin Kurbanov
2024-10-14 12:27       ` Martin Kurbanov
2024-10-25  7:48       ` Miquel Raynal
2024-10-25  7:48         ` Miquel Raynal
2024-08-27 17:49 ` [PATCH v2 3/5] mtd: spinand: make spinand_wait() global Martin Kurbanov
2024-08-27 17:49   ` Martin Kurbanov
2024-08-27 17:49 ` [PATCH v2 4/5] mtd: spinand: micron: OTP access for MT29F2G01ABAGD Martin Kurbanov
2024-08-27 17:49   ` Martin Kurbanov
2024-10-01  9:31   ` Miquel Raynal
2024-10-01  9:31     ` Miquel Raynal
2024-10-14 12:48     ` Martin Kurbanov
2024-10-14 12:48       ` Martin Kurbanov
2024-10-25  7:51       ` Miquel Raynal
2024-10-25  7:51         ` Miquel Raynal
2024-08-27 17:49 ` [PATCH v2 5/5] mtd: spinand: esmt: OTP access for F50{L,D}1G41LB Martin Kurbanov
2024-08-27 17:49   ` Martin Kurbanov
2024-10-01  9:32   ` Miquel Raynal
2024-10-01  9:32     ` Miquel Raynal

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=20240902161844.2bf982ef@xps-13 \
    --to=miquel.raynal@bootlin.com \
    --cc=acelan.kao@canonical.com \
    --cc=avromanov@salutedevices.com \
    --cc=broonie@kernel.org \
    --cc=ezra.buehler@husqvarnagroup.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=kernel@salutedevices.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michael@walle.cc \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mmkurbanov@salutedevices.com \
    --cc=quic_mdalam@quicinc.com \
    --cc=quic_sridsn@quicinc.com \
    --cc=richard@nod.at \
    --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 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.