[PATCH v2 2/5] mtd: spinand: add OTP support

Miquel Raynal miquel.raynal at bootlin.com
Mon Sep 2 07:18:44 PDT 2024


Hi Martin,

mmkurbanov at 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



More information about the linux-mtd mailing list