spi_nor_otp_is_locked_sr2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 to struct 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 🌈

  • 0 on success.
  • -errno otherwise.

So yeah: zero means slay, and a negative -errno means the error vibe check did not pass. πŸ’€


SEE ALSO πŸ‘‘


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