Lines Matching full:nor
294 * struct spi_nor_controller_ops - SPI NOR controller driver specific
302 * @read: read data from the SPI NOR.
303 * @write: write data to the SPI NOR.
304 * @erase: erase a sector of the SPI NOR at the offset @offs; if
305 * not provided by the driver, SPI NOR will send the erase
309 int (*prepare)(struct spi_nor *nor);
310 void (*unprepare)(struct spi_nor *nor);
311 int (*read_reg)(struct spi_nor *nor, u8 opcode, u8 *buf, size_t len);
312 int (*write_reg)(struct spi_nor *nor, u8 opcode, const u8 *buf,
315 ssize_t (*read)(struct spi_nor *nor, loff_t from, size_t len, u8 *buf);
316 ssize_t (*write)(struct spi_nor *nor, loff_t to, size_t len,
318 int (*erase)(struct spi_nor *nor, loff_t offs);
330 * struct spi_nor - Structure for defining the SPI NOR layer
333 * @dev: pointer to an SPI device or an SPI NOR controller device
338 * @info: SPI NOR part JEDEC MFR ID and other info
339 * @manufacturer: SPI NOR manufacturer
340 * @page_size: the page size of the SPI NOR
347 * @flags: flag options for the current SPI NOR (SNOR_F_*)
351 * @controller_ops: SPI NOR controller driver specific operations.
352 * @params: [FLASH-SPECIFIC] SPI NOR flash parameters and settings.
392 static inline void spi_nor_set_flash_node(struct spi_nor *nor, in spi_nor_set_flash_node() argument
395 mtd_set_of_node(&nor->mtd, np); in spi_nor_set_flash_node()
398 static inline struct device_node *spi_nor_get_flash_node(struct spi_nor *nor) in spi_nor_get_flash_node() argument
400 return mtd_get_of_node(&nor->mtd); in spi_nor_get_flash_node()
404 * spi_nor_scan() - scan the SPI NOR
405 * @nor: the spi_nor structure
409 * The drivers can use this fuction to scan the SPI NOR.
417 int spi_nor_scan(struct spi_nor *nor, const char *name,
421 * spi_nor_restore_addr_mode() - restore the status of SPI NOR
422 * @nor: the spi_nor structure
424 void spi_nor_restore(struct spi_nor *nor);