spi_nor_otp_is_locked_sr2(9)
NAME π
okay bestie, welcome to the Kernel API Manual page for spi_nor_otp_is_locked_sr2(9) β and this function is literally here to get the OTP region lock status. That's the whole assignment, no cap. π
SYNOPSIS β¨
int spi_nor_otp_is_locked_sr2 (struct spi_nor *nor , unsigned int region
);
ARGUMENTS π¦
norβ pointer tostruct spi_nor. That's the struct pointer you're handing over, bestie.regionβ the OTP region. Yep, the region we're checking for lock status.
DESCRIPTION πΈ
So what this does: it retrieves the OTP region lock bit by reading the status register-2. That's the method, periodt.
This method is used on GigaDevice and Winbond flashes. Iconic behavior, honestly. π₯
RETURN π
0on success.-errnootherwise.
So yeah: zero means slay, and a negative -errno means the error vibe check did not pass. π
SEE ALSO π
- Kernel file
./drivers/mtd/spi-nor/otp.c spi_nor_otp_read_secr(9)spi_nor_otp_write_secr(9)spi_nor_otp_erase_secr(9)spi_nor_otp_lock_sr2(9)
later bestie π«Ά β this cute little sign-off is coming at you from the kernel source tree at ./drivers/mtd/spi-nor, October 2026 edition, still serving full spi_nor_otp_is_locked_sr2(9) main character energy. π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms