xiaoxiang781216 commented on code in PR #15987: URL: https://github.com/apache/nuttx/pull/15987#discussion_r1993706173
########## drivers/mtd/ramtron.c: ########## @@ -932,19 +945,22 @@ static int ramtron_ioctl(FAR struct mtd_dev_s *dev, * as instances that can be bound to other functions * (such as a block or character driver front end). * + * Note: + * This implementation can handle multiple FLASH parts per SPI device by + * using the spi_devid to handle chip select between devices. The spi_devid + * passed to this function must be handled by the corresponding spi select + * function in board files. ****************************************************************************/ -FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev) +FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev, + uint16_t spi_devid) Review Comment: ```suggestion uint16_t devid) ``` ########## include/nuttx/mtd/mtd.h: ########## @@ -510,12 +510,13 @@ void rammtd_uninitialize(FAR struct mtd_dev_s *dev); * Create and initialize a Ramtron MTD device instance. * * Input Parameters: - * start - Address of the beginning of the allocated RAM regions. - * size - The size in bytes of the allocated RAM region. + * dev - Pointer to the SPI device instance. + * spi_devid - SPI device ID to manage CS lines in board * ****************************************************************************/ -FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev); +FAR struct mtd_dev_s *ramtron_initialize(FAR struct spi_dev_s *dev, + uint16_t spi_devid); Review Comment: align -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org